/* ============================================
   小鱼快传 - Little Fish Quick Transfer
   StyleSheet
   ============================================ */

:root {
    --primary: #4facfe;
    --primary-dark: #00f2fe;
    --primary-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --bg-start: #0a1628;
    --bg-end: #1a1a2e;
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-border: rgba(79, 172, 254, 0.4);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.4);
    --success: #51cf66;
    --error: #ff6b6b;
    --warning: #ffd43b;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --radius-sm: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ============================================
   Background Animation - Floating Bubbles
   ============================================ */

.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(79, 172, 254, 0.15), rgba(0, 242, 254, 0.05));
    animation: float 20s infinite ease-in-out;
}

.b1 { width: 200px; height: 200px; top: 10%; left: 5%; animation-delay: 0s; animation-duration: 25s; }
.b2 { width: 150px; height: 150px; top: 60%; left: 80%; animation-delay: -5s; animation-duration: 20s; }
.b3 { width: 100px; height: 100px; top: 80%; left: 20%; animation-delay: -10s; animation-duration: 18s; }
.b4 { width: 250px; height: 250px; top: 30%; left: 60%; animation-delay: -15s; animation-duration: 30s; }
.b5 { width: 80px; height: 80px; top: 50%; left: 40%; animation-delay: -3s; animation-duration: 15s; }
.b6 { width: 120px; height: 120px; top: 20%; left: 90%; animation-delay: -8s; animation-duration: 22s; }

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    25% { transform: translateY(-30px) scale(1.05); }
    50% { transform: translateY(-10px) scale(1.1); }
    75% { transform: translateY(-40px) scale(1.02); }
}

/* ============================================
   Layout
   ============================================ */

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 16px;
    position: relative;
    z-index: 1;
}

/* ============================================
   Header
   ============================================ */

.header {
    text-align: center;
    margin-bottom: 32px;
    padding-top: 20px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo-icon {
    font-size: 48px;
    line-height: 1;
    display: inline-block;
    animation: orcaSwim 3s ease-in-out infinite;
}

@keyframes orcaSwim {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(-5deg); }
    75% { transform: translateY(-4px) rotate(3deg); }
}

.logo h1 {
    font-size: 36px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    letter-spacing: 4px;
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--card-hover-border);
    box-shadow: 0 8px 40px rgba(79, 172, 254, 0.1);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-hint {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ============================================
   Upload Zone
   ============================================ */

.upload-zone {
    border: 2px dashed rgba(79, 172, 254, 0.3);
    border-radius: var(--radius-sm);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary);
    background: rgba(79, 172, 254, 0.05);
    transform: translateY(-2px);
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 16px;
    opacity: 0.8;
}

.upload-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.upload-hint {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 20px;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

.btn-copy {
    background: rgba(79, 172, 254, 0.15);
    color: var(--primary);
    padding: 8px 16px;
    font-size: 13px;
}

.btn-copy:hover {
    background: rgba(79, 172, 254, 0.25);
}

.btn-copy.copied {
    background: rgba(81, 207, 102, 0.15);
    color: var(--success);
}

.download-btn {
    padding: 14px 32px;
    font-size: 16px;
}

/* ============================================
   Progress Bar
   ============================================ */

.upload-progress {
    padding: 20px 0;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-sm);
}

.file-icon {
    font-size: 24px;
}

.file-name {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
}

/* ============================================
   Result Card
   ============================================ */

.result-card, .error-card {
    text-align: center;
    padding: 20px 0;
}

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

.result-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.result-hint {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.code-text {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 8px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Courier New', monospace;
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

/* Countdown Bar */
.countdown-bar {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.countdown-fill {
    height: 100%;
    width: 100%;
    background: var(--primary-gradient);
    border-radius: 2px;
    transition: width 1s linear;
}

.countdown-text {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

/* ============================================
   Download Section
   ============================================ */

.code-input-group {
    display: flex;
    gap: 12px;
}

.code-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 6px;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
}

.code-input:focus {
    border-color: var(--primary);
    background: rgba(79, 172, 254, 0.08);
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.15);
}

.code-input::placeholder {
    letter-spacing: 2px;
    font-size: 16px;
    color: var(--text-muted);
}

.download-info {
    margin-top: 20px;
}

.download-actions {
    text-align: center;
    margin-top: 16px;
}

.download-error {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: var(--radius-sm);
}

.error-msg {
    color: var(--error);
    font-size: 14px;
}

/* ============================================
   Status Card
   ============================================ */

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.status-item {
    text-align: center;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-sm);
}

.status-label {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 4px;
}

.status-value {
    font-size: 28px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-unit {
    color: var(--text-muted);
    font-size: 12px;
}

.status-bar {
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}

.status-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--primary-gradient);
    transition: width 0.5s ease;
}

/* ============================================
   Instructions
   ============================================ */

.steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.step-content h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ============================================
   Loading Spinner
   ============================================ */

.loading-spinner {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(79, 172, 254, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Footer
   ============================================ */

.footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 13px;
}

/* ============================================
   Toast Notification
   ============================================ */

.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 12px 24px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    transition: transform 0.4s ease;
    opacity: 0;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: rgba(81, 207, 102, 0.3);
}

.toast.error {
    border-color: rgba(255, 107, 107, 0.3);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 480px) {
    .container {
        padding: 16px 12px;
    }

    .logo h1 {
        font-size: 28px;
    }

    .card {
        padding: 20px 16px;
    }

    .upload-zone {
        padding: 28px 16px;
    }

    .code-text {
        font-size: 28px;
        letter-spacing: 5px;
    }

    .code-input-group {
        flex-direction: column;
    }

    .status-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .status-value {
        font-size: 22px;
    }

    .result-actions {
        flex-direction: column;
        gap: 8px;
    }

    .result-actions .btn {
        width: 100%;
    }
}
