/* HyperDrop - Professional Landing Page */

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

:root {
    /* Colors - Dark Theme */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-card: #161618;
    --bg-elevated: #1c1c1f;
    --bg-hover: #222225;

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.12);

    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --text-faint: #52525b;

    /* Accent Colors */
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --accent-dark: #7c3aed;
    --accent-glow: rgba(139, 92, 246, 0.25);
    --accent-subtle: rgba(139, 92, 246, 0.1);

    /* Semantic Colors */
    --success: #22c55e;
    --success-subtle: rgba(34, 197, 94, 0.12);
    --error: #ef4444;
    --error-subtle: rgba(239, 68, 68, 0.12);
    --warning: #f59e0b;
    --info: #3b82f6;
    --info-subtle: rgba(59, 130, 246, 0.12);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 0 0 1px var(--border-subtle), 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 80px var(--accent-glow);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse 60% 40% at 0% 100%, rgba(34, 197, 94, 0.05) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

/* Page Layout */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-8) var(--space-4);
}

/* ================================ */
/* Hero Section */
/* ================================ */

.hero {
    text-align: center;
    max-width: 600px;
    margin-bottom: var(--space-10);
    padding-top: var(--space-8);
}

.hero-content {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Logo Badge */
.logo-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-4) var(--space-2) var(--space-3);
    margin-bottom: var(--space-6);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 50%;
    color: white;
}

.logo-icon svg {
    width: 14px;
    height: 14px;
}

.logo-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

/* Hero Title */
.hero-title {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    margin-bottom: var(--space-5);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 440px;
    margin: 0 auto var(--space-8);
}

/* Trust Badges */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--text-secondary);
}

.trust-badge svg {
    color: var(--accent-light);
    flex-shrink: 0;
}

/* ================================ */
/* App Card */
/* ================================ */

.app-container {
    width: 100%;
    max-width: 460px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-card);
}

/* Mode Navigation */
.mode-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-1);
    margin-bottom: var(--space-6);
}

.mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-sans);
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.mode-btn svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-base);
}

.mode-btn:hover:not(.active) {
    color: var(--text-secondary);
    background: var(--bg-hover);
}

.mode-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.mode-btn.active svg {
    color: var(--accent-light);
}

/* Mode Sections */
.mode-section {
    animation: fadeIn 0.25s ease-out;
}

.mode-section.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ================================ */
/* Drop Zone */
/* ================================ */

.drop-zone {
    position: relative;
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-10) var(--space-6);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--bg-secondary);
    margin-bottom: var(--space-5);
}

.drop-zone:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

.drop-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-subtle);
    box-shadow: var(--shadow-glow);
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

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

.drop-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    color: var(--text-muted);
    margin-bottom: var(--space-4);
    transition: all var(--transition-base);
}

.drop-zone:hover .drop-icon {
    color: var(--accent-light);
    border-color: var(--accent-subtle);
    background: var(--accent-subtle);
}

.drop-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.drop-link {
    color: var(--accent-light);
    font-weight: 500;
}

.drop-hint {
    font-size: 13px;
    color: var(--text-muted);
}

.no-upload-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding: var(--space-2) var(--space-4);
    background: var(--success-subtle);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--success);
}

.no-upload-badge svg {
    flex-shrink: 0;
}

/* Receive Hero */
.receive-hero {
    text-align: center;
    padding: var(--space-6) var(--space-4);
    margin-bottom: var(--space-5);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
}

.receive-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

.receive-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

/* ================================ */
/* File List */
/* ================================ */

.file-list {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-5);
}

.file-list.hidden {
    display: none;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: var(--bg-hover);
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: var(--space-4);
}

.file-size {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

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

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-4) var(--space-6);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    color: white;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.primary-btn svg {
    width: 18px;
    height: 18px;
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

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

.primary-btn:disabled {
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.primary-btn.hidden {
    display: none;
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-sans);
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.secondary-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* ================================ */
/* Form Elements */
/* ================================ */

.input-section,
.share-section,
.incoming-section {
    margin-bottom: var(--space-5);
}

.share-section.hidden,
.incoming-section.hidden {
    display: none;
}

.field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-2);
}

.text-input,
.url-input {
    width: 100%;
    padding: var(--space-4);
    font-size: 14px;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.text-input::placeholder,
.url-input::placeholder {
    color: var(--text-faint);
}

.text-input:focus,
.url-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.url-input {
    font-family: var(--font-mono);
    font-size: 13px;
}

.input-group {
    display: flex;
    gap: var(--space-3);
}

.input-group .text-input {
    flex: 1;
}

.input-group .primary-btn {
    width: auto;
    white-space: nowrap;
}

.url-container {
    display: flex;
    gap: var(--space-2);
}

.url-container .url-input {
    flex: 1;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-4);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-sans);
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.copy-btn svg {
    width: 16px;
    height: 16px;
}

.copy-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.share-hint {
    margin-top: var(--space-3);
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

.action-group {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

.action-group .primary-btn,
.action-group .secondary-btn {
    flex: 1;
}

/* Incoming Files Header */
.incoming-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
}

.incoming-header svg {
    color: var(--accent-light);
}

.incoming-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

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

.progress-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}

.progress-section.hidden {
    display: none;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.progress-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.progress-value {
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--accent-light);
}

.progress-track {
    height: 8px;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: var(--radius-full);
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ================================ */
/* Status Messages */
/* ================================ */

.status-message {
    padding: var(--space-4);
    font-size: 14px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
    text-align: center;
    display: none;
}

.status-message:not(:empty) {
    display: block;
}

.status-message.info {
    background: var(--info-subtle);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-message.success {
    background: var(--success-subtle);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-message.error {
    background: var(--error-subtle);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Waiting state with animated dots */
.status-message.waiting {
    background: var(--info-subtle);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.status-message.waiting::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-top-color: var(--info);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Animated ellipsis for waiting text */
.waiting-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* ================================ */
/* Fingerprint Indicator */
/* ================================ */

.fingerprint-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--success-subtle);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
}

.fingerprint-indicator.hidden {
    display: none;
}

.fingerprint-lock {
    display: flex;
    color: var(--success);
}

.fingerprint-emojis {
    font-size: 18px;
    letter-spacing: 4px;
}

.fingerprint-info {
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    transition: all var(--transition-fast);
}

.fingerprint-info:hover {
    background: var(--accent-subtle);
    color: var(--accent-light);
}

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

.footer {
    margin-top: auto;
    padding-top: var(--space-10);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    font-size: 13px;
    color: var(--text-muted);
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent-light);
}

.footer-dot {
    color: var(--text-faint);
}

.footer-text {
    color: var(--text-muted);
}

/* ================================ */
/* Utility Classes */
/* ================================ */

.hidden {
    display: none !important;
}

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

@media (max-width: 520px) {
    .page-wrapper {
        padding: var(--space-6) var(--space-4);
    }

    .hero {
        padding-top: var(--space-4);
        margin-bottom: var(--space-8);
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .trust-badges {
        flex-direction: column;
        align-items: center;
    }

    .app-card {
        padding: var(--space-5);
        border-radius: var(--radius-xl);
    }

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

    .input-group .primary-btn {
        width: 100%;
    }

    .url-container {
        flex-direction: column;
    }

    .action-group {
        flex-direction: column;
    }

    .footer {
        flex-wrap: wrap;
        text-align: center;
    }
}

/* ================================ */
/* Learn More Page Styles */
/* ================================ */

.learn-more-page {
    max-width: 640px;
    margin: 0 auto;
    padding: var(--space-10) var(--space-6);
}

.learn-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.back-link {
    display: inline-block;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: var(--space-6);
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--text-primary);
}

.learn-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: var(--space-4);
}

.learn-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

.learn-content {
    margin-bottom: var(--space-12);
}

.content-section {
    margin-bottom: var(--space-12);
}

.section-heading {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}

.prose {
    margin-bottom: var(--space-6);
}

.prose p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Simple Diagrams */
.diagram-simple {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-8) var(--space-6);
    margin-bottom: var(--space-6);
}

.diagram-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
}

.diagram-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.diagram-node .node-icon {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-elevated);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.diagram-node.server .node-icon {
    background: var(--error-subtle);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.diagram-node .node-label {
    font-size: 11px;
    color: var(--text-muted);
}

.diagram-arrow {
    font-size: 20px;
    color: var(--text-muted);
}

.diagram-arrow.direct {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    color: var(--success);
}

.diagram-arrow.direct span:first-child {
    font-size: 24px;
}

.diagram-arrow .arrow-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Steps List */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.step {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
}

.step-num {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.step-text {
    padding-top: var(--space-1);
}

.step-text strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.step-text span {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.feature {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-5);
}

.feature-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.feature-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Learn Footer */
.learn-footer {
    text-align: center;
    padding-top: var(--space-8);
    border-top: 1px solid var(--border-subtle);
}

.back-to-app {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.back-to-app:hover {
    color: var(--accent-light);
}

@media (max-width: 640px) {
    .learn-title {
        font-size: 28px;
    }

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

    .diagram-row {
        flex-direction: column;
        gap: var(--space-3);
    }

    .diagram-arrow {
        transform: rotate(90deg);
    }

    .diagram-arrow.direct {
        transform: none;
    }
}

/* ================================ */
/* PWA Styles */
/* ================================ */

.install-prompt {
    position: fixed;
    bottom: var(--space-4);
    left: var(--space-4);
    right: var(--space-4);
    max-width: 400px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

.install-prompt.hidden {
    display: none;
}

.install-prompt-content {
    display: flex;
    align-items: center;
    padding: var(--space-4);
    gap: var(--space-4);
}

.install-prompt-icon {
    font-size: 24px;
}

.install-prompt-text {
    flex: 1;
}

.install-prompt-text h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: var(--space-1);
}

.install-prompt-text p {
    font-size: 12px;
    color: var(--text-secondary);
}

.install-prompt-actions {
    display: flex;
    gap: var(--space-2);
}

.install-btn {
    padding: var(--space-2) var(--space-4);
    font-size: 12px;
    font-weight: 600;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.dismiss-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-1);
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@media (display-mode: standalone) {
    .page-wrapper {
        padding-top: max(var(--space-6), env(safe-area-inset-top));
        padding-bottom: max(var(--space-6), env(safe-area-inset-bottom));
    }

    .install-prompt {
        display: none !important;
    }
}

/* Resume option */
.resume-option {
    background: var(--bg-secondary);
    border: 1px solid var(--warning);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.resume-content {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

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

.resume-text strong {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: var(--space-1);
}

.resume-text p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================
   State Indicator & Error Recovery UI
   ============================================ */

.state-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    transition: all var(--transition-base);
}

.state-badge {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.state-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all var(--transition-base);
}

.state-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* State-specific styles */
.state-indicator[data-state="connecting"] {
    border-color: var(--info);
}

.state-indicator[data-state="connecting"] .state-dot {
    background: var(--info);
    animation: pulse 1.5s infinite;
}

.state-indicator[data-state="ready"] {
    border-color: var(--success);
}

.state-indicator[data-state="ready"] .state-dot {
    background: var(--success);
}

.state-indicator[data-state="transferring"] {
    border-color: var(--accent);
}

.state-indicator[data-state="transferring"] .state-dot {
    background: var(--accent);
    animation: pulse 1s infinite;
}

.state-indicator[data-state="paused"] {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.05);
}

.state-indicator[data-state="paused"] .state-dot {
    background: var(--warning);
}

.state-indicator[data-state="error"] {
    border-color: var(--error);
    background: var(--error-subtle);
}

.state-indicator[data-state="error"] .state-dot {
    background: var(--error);
}

.state-indicator[data-state="completed"] {
    border-color: var(--success);
    background: var(--success-subtle);
}

.state-indicator[data-state="completed"] .state-dot {
    background: var(--success);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Action Buttons */
.state-actions {
    display: flex;
    gap: var(--space-2);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.retry-btn {
    background: var(--info-subtle);
    color: var(--info);
}

.retry-btn:hover {
    background: var(--info);
    color: white;
}

.cancel-btn {
    background: var(--error-subtle);
    color: var(--error);
}

.cancel-btn:hover {
    background: var(--error);
    color: white;
}

.action-btn svg {
    flex-shrink: 0;
}
