@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 50%, #E3F2FD 100%);
    color: #333;
    min-height: 100vh;
}

/* Background Effects */
.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.bg-orb-1 {
    width: 300px;
    height: 300px;
    background: #1565C0;
    top: -50px;
    left: -50px;
    animation: float 20s infinite ease-in-out;
}

.bg-orb-2 {
    width: 250px;
    height: 250px;
    background: #42A5F5;
    bottom: -50px;
    right: -50px;
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(20px, -20px); }
    50% { transform: translate(-10px, 15px); }
    75% { transform: translate(-20px, -10px); }
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    padding: 24px 20px;
    background: white;
    border-radius: 16px;
    margin-bottom: 20px;
    color: #1565C0;
    border: 1px solid rgba(21, 101, 192, 0.1);
    box-shadow: 0 4px 20px rgba(21, 101, 192, 0.1);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1565C0, #42A5F5, #1565C0);
}

.header-logo {
    margin-bottom: 8px;
}

.logo-shooting-star {
    display: inline-flex;
    align-items: center;
    position: relative;
    width: 50px;
    height: 30px;
}

.star {
    width: 10px;
    height: 10px;
    background: #1565C0;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(21, 101, 192, 0.5);
    animation: twinkle 2s infinite;
}

.star-tail {
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #42A5F5);
    animation: tailFade 2s infinite;
}

@keyframes twinkle {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.8); opacity: 0.6; }
}

@keyframes tailFade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.header h1 {
    font-family: 'Playfair Display', 'Noto Sans SC', serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
}

.header .subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #F5F5F5;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #1565C0;
    border: 1px solid rgba(21, 101, 192, 0.2);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Main Layout */
.main-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.log-panel {
    width: 25%;
    min-width: 250px;
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(21, 101, 192, 0.1);
    box-shadow: 0 4px 20px rgba(21, 101, 192, 0.1);
    overflow: hidden;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

.log-panel-header {
    padding: 16px;
    background: linear-gradient(135deg, #1565C0, #0D47A1);
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.log-panel-icon {
    font-size: 18px;
}

.log-panel-header h3 {
    font-size: 14px;
    font-weight: 600;
}

.log-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 300px;
}

.log-empty {
    text-align: center;
    padding: 40px 10px;
    color: #999;
}

.log-empty-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
    opacity: 0.3;
}

.log-empty p {
    font-size: 13px;
}

/* Log Entries */
.log-entry {
    padding: 8px 10px;
    border-bottom: 1px solid #F5F5F5;
    font-size: 12px;
    line-height: 1.5;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    color: #999;
    margin-right: 8px;
    font-family: monospace;
}

.log-message {
    color: #333;
}

.log-progress .log-message {
    color: #1565C0;
}

.log-success .log-message {
    color: #4CAF50;
}

.log-error .log-message {
    color: #EF5350;
}

.log-info .log-message {
    color: #2196F3;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.08);
    border: 1px solid rgba(21, 101, 192, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: rgba(21, 101, 192, 0.1);
    color: #1565C0;
}

.tab-btn.active {
    background: linear-gradient(135deg, #1565C0, #0D47A1);
    color: white;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

.tab-icon {
    font-size: 16px;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cards */
.card {
    background: white;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(21, 101, 192, 0.1);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.08);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(21, 101, 192, 0.1);
}

.card-header-icon {
    font-size: 18px;
    color: #1565C0;
}

.card-header-title {
    font-size: 16px;
    font-weight: 600;
    color: #1565C0;
}

/* Upload Area */
.upload-card {
    padding: 0;
    overflow: hidden;
}

.upload-area {
    border: 2px dashed rgba(21, 101, 192, 0.3);
    border-radius: 14px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(21, 101, 192, 0.02);
}

.upload-area:hover {
    border-color: #42A5F5;
    background: rgba(21, 101, 192, 0.05);
}

.upload-area.dragover {
    border-color: #42A5F5;
    background: rgba(21, 101, 192, 0.1);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.upload-text {
    color: #333;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
}

.upload-text code {
    background: rgba(21, 101, 192, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    color: #1565C0;
}

.upload-subtext {
    color: #999;
    font-size: 12px;
}

/* File List */
.file-list {
    margin-bottom: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 6px;
    border: 1px solid rgba(21, 101, 192, 0.1);
    transition: all 0.2s;
}

.file-item:hover {
    background: rgba(21, 101, 192, 0.05);
}

.file-item .file-name {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.file-item .file-size {
    font-size: 11px;
    color: #999;
    margin-left: 10px;
}

.file-item .file-remove {
    background: none;
    border: none;
    color: #EF5350;
    cursor: pointer;
    font-size: 18px;
    padding: 2px;
    transition: transform 0.2s;
}

.file-item .file-remove:hover {
    transform: scale(1.2);
}

/* Options */
.options-card {
    padding: 14px;
}

.options {
    margin-bottom: 0;
}

.option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.option-row label {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.option-group select {
    padding: 10px 14px;
    border: 1px solid rgba(21, 101, 192, 0.3);
    border-radius: 8px;
    font-size: 13px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
}

.option-group select:hover,
.option-group select:focus {
    border-color: #42A5F5;
}

.option-group select option {
    background: white;
    color: #333;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1565C0, #0D47A1);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(21, 101, 192, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover:not(:disabled)::before {
    opacity: 1;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 101, 192, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 16px;
}

/* Progress */
.progress-area {
    background: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(21, 101, 192, 0.1);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.08);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-label {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.progress-percentage {
    font-size: 14px;
    color: #1565C0;
    font-weight: 700;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #E3F2FD;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1565C0, #42A5F5);
    border-radius: 3px;
    transition: width 0.3s;
    width: 0%;
}

.current-file {
    text-align: center;
    font-size: 11px;
    color: #999;
    margin-top: 6px;
}

/* Results */
.results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Version Notice */
.version-notice {
    display: flex;
    align-items: center;
    background: #FFF3E0;
    border: 1px solid #FFB74D;
    border-radius: 10px;
    padding: 12px;
    gap: 10px;
}

.version-icon {
    font-size: 20px;
}

.version-text {
    font-size: 13px;
    color: #333;
}

.version-text strong {
    color: #E65100;
    font-weight: 600;
}

/* Result File List */
.result-file-list {
    background: #F5F5F5;
    border-radius: 10px;
    padding: 10px;
}

.result-file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    margin-bottom: 6px;
    gap: 8px;
    border: 1px solid rgba(21, 101, 192, 0.1);
}

.result-file-item:last-child {
    margin-bottom: 0;
}

.result-file-item .file-icon {
    font-size: 16px;
}

.result-file-item .file-name {
    flex: 1;
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.result-file-item .file-size {
    font-size: 11px;
    color: #999;
}

/* Download ZIP Button */
.btn-download-zip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1565C0, #0D47A1);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(21, 101, 192, 0.3);
}

.btn-download-zip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 101, 192, 0.4);
}

.btn-download-zip .download-icon {
    font-size: 18px;
}

/* About Cards */
.about-card {
    background: white;
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(21, 101, 192, 0.1);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.08);
}

.feature-card h2 {
    color: #1565C0;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.version-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.version-badge {
    background: linear-gradient(135deg, #1565C0, #0D47A1);
    color: white;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
}

.version-label {
    color: #999;
    font-size: 11px;
}

.about-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 12px 0 16px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    background: #F5F5F5;
    border-radius: 8px;
}

.feature-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.feature-text {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.usage-steps h3 {
    color: #1565C0;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.steps-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #F5F5F5;
    border-radius: 8px;
}

.step-num {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #1565C0, #0D47A1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-text {
    font-size: 12px;
    color: #333;
}

.warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #FFF3E0;
    border-left: 4px solid #FFB74D;
    padding: 12px;
    border-radius: 6px;
    color: #E65100;
}

.warning-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.warning-text {
    font-size: 12px;
    line-height: 1.5;
}

/* Agreement Content */
.agreement-content {
    font-size: 13px;
    color: #666;
    line-height: 1.7;
}

.agreement-content h4 {
    color: #1565C0;
    font-size: 14px;
    margin: 16px 0 8px;
    font-weight: 600;
}

.agreement-content h4:first-child {
    margin-top: 0;
}

.agreement-content p {
    margin-bottom: 6px;
}

.agreement-content ul {
    margin-left: 16px;
    margin-bottom: 10px;
}

.agreement-content ul li {
    margin-bottom: 4px;
}

.highlight-text {
    color: #E65100;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 12px;
}

/* Captcha Wrapper */
.captcha-wrapper {
    background: white;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(21, 101, 192, 0.1);
    display: flex;
    justify-content: center;
}

.captcha-wrapper.hidden {
    display: none;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s;
    padding: 20px;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #1565C0, #0D47A1);
    color: white;
    padding: 20px;
    text-align: center;
}

.modal-header-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.modal-header h2 {
    font-size: 16px;
    font-weight: 700;
}

.modal-body {
    padding: 20px;
    max-height: 50vh;
    overflow-y: auto;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.modal-intro {
    margin-bottom: 16px;
    color: #333;
    font-weight: 500;
}

.modal-section {
    background: #F5F5F5;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.modal-section h4 {
    color: #1565C0;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 600;
}

.modal-section p {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.modal-section.warning-box {
    background: #FFF3E0;
    border-left: 4px solid #E65100;
}

.modal-section.warning-box p {
    color: #E65100;
}

.modal-footer {
    padding: 14px 20px 20px;
    text-align: center;
}

.btn-agree {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #1565C0, #0D47A1);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-agree:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px 0 10px;
    margin-top: 20px;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(21, 101, 192, 0.2), transparent);
    margin-bottom: 12px;
}

.footer-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #999;
    font-size: 11px;
}

.footer-icon {
    font-size: 12px;
    color: #1565C0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(21, 101, 192, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(21, 101, 192, 0.5);
}

/* Responsive */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }

    .log-panel {
        width: 100%;
        max-height: 300px;
        position: static;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 22px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps-list {
        grid-template-columns: 1fr;
    }

    .tab-btn {
        padding: 10px 6px;
        font-size: 12px;
    }

    .tab-text {
        display: none;
    }

    .tab-icon {
        font-size: 18px;
    }
}
