/* ============================================
   TRANSFERFINN - Main Styles (LimeWire-Inspired)
   Blue Theme with Dark/Light Mode
   ============================================ */

:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a0a1a;
    --bg-secondary: #111128;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    
    /* Brand Colors */
    --brand-primary: #2563eb;
    --brand-primary-dark: #1d4ed8;
    --brand-primary-light: #3b82f6;
    --brand-gradient: linear-gradient(135deg, #1a56db, #7c3aed);
    --brand-gradient-hover: linear-gradient(135deg, #2563eb, #8b5cf6);
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Border */
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(37, 99, 235, 0.3);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(37, 99, 235, 0.12);
    --shadow-xl: 0 30px 80px rgba(37, 99, 235, 0.18);
    
    /* Upload Box */
    --upload-border: rgba(255, 255, 255, 0.06);
    --upload-border-hover: #2563eb;
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Font */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Transitions */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.06);
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #94a3b8;
    
    --border-color: rgba(0, 0, 0, 0.06);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 60px rgba(37, 99, 235, 0.08);
    --shadow-xl: 0 30px 80px rgba(37, 99, 235, 0.12);
    
    --upload-border: rgba(0, 0, 0, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background var(--transition), color var(--transition);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: var(--brand-primary-light);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--brand-primary);
    border-radius: 50px;
}

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: background var(--transition), border-color var(--transition);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    border-radius: var(--radius-sm);
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--brand-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    color: var(--text-primary);
}

.theme-toggle:hover {
    border-color: var(--brand-primary);
    transform: rotate(20deg);
}

/* ===== MENU TOGGLE (Hamburger) ===== */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    cursor: pointer;
    transition: var(--transition);
}

.menu-toggle:hover {
    border-color: var(--brand-primary);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    z-index: 2000;
    padding: 24px;
    transition: left 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo-text {
    font-size: 1.1rem;
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.sidebar-nav a {
    color: var(--text-secondary);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.sidebar-nav a:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: var(--brand-primary);
    color: white;
}

.sidebar-nav hr {
    margin: 12px 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--brand-gradient);
    color: white;
}

.btn-primary:hover {
    background: var(--brand-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: var(--brand-primary);
    color: white;
}

.btn-secondary:hover {
    background: var(--brand-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.05rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== HERO ===== */
.hero {
    padding: 40px 0 60px;
    flex: 1;
}

.hero-content {
    text-align: center;
    max-width: 780px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--brand-primary-light);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.secure-badge {
    display: inline-block;
    margin-left: 8px;
    color: var(--brand-primary-light);
    font-weight: 600;
}

/* ===== AD CONTAINERS ===== */
.ad-container {
    width: 100%;
    min-height: 90px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    overflow: hidden;
    transition: var(--transition);
}

.ad-container:hover {
    border-color: rgba(37, 99, 235, 0.2);
}

.ad-placeholder {
    text-align: center;
    padding: 12px;
}

.ad-placeholder span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.ad-placeholder p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

.ad-top {
    margin-bottom: 32px;
    min-height: 100px;
}

.ad-bottom {
    margin-top: 40px;
    min-height: 100px;
}

/* ===== TRANSFER BOX ===== */
.transfer-box {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    margin-bottom: 32px;
    transition: var(--transition);
}

.transfer-box:hover {
    box-shadow: var(--shadow-lg);
}

/* ===== DROP ZONE ===== */
.drop-zone {
    border: 2px dashed var(--upload-border);
    border-radius: var(--radius-md);
    padding: 50px 32px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--brand-primary);
    background: rgba(37, 99, 235, 0.04);
}

.drop-zone.dragover {
    background: rgba(37, 99, 235, 0.08);
    transform: scale(1.01);
}

.drop-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
    display: block;
}

.drop-zone h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.drop-subtext {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.drop-badge {
    display: inline-block;
    padding: 4px 16px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--brand-primary-light);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

/* ===== FILE LIST ===== */
.file-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.file-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.file-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-left: 12px;
}

.file-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.file-remove:hover {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
}

/* ===== TRANSFER ACTIONS ===== */
.transfer-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

/* ===== TRANSFER STEPS ===== */
.transfer-step {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.transfer-step.hidden {
    display: none;
}

/* ===== SHARE CONTAINER ===== */
.share-container {
    text-align: center;
    padding: 20px 0;
}

.share-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
    display: block;
}

.share-container h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.share-subtext {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.link-box {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto 20px;
}

.link-box input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.link-box input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.share-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== QR CODE ===== */
.qr-container {
    margin-top: 24px;
    padding: 24px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    display: inline-block;
}

.qr-container.hidden {
    display: none;
}

.qr-subtext {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== TRANSFER STATUS ===== */
.transfer-status {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
}

.status-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.status-icon {
    font-size: 1.5rem;
}

/* ===== PROGRESS ===== */
.progress-container {
    max-width: 400px;
    margin: 16px auto;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 50px;
    overflow: hidden;
}

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

.progress-text {
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 8px;
}

.progress-speed {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== RECEIVE CONTAINER ===== */
.receive-container {
    text-align: center;
    padding: 20px 0;
}

.receive-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
    animation: pulse 1.5s ease-in-out infinite;
}

.file-detail {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ===== HOW IT WORKS (3 Steps) ===== */
.how-it-works-section {
    margin: 48px 0 32px;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 32px;
}

.steps-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.step-card {
    text-align: center;
    background: var(--bg-card);
    padding: 28px 20px;
    border-radius: var(--radius-md);
    flex: 1;
    min-width: 160px;
    max-width: 220px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: var(--shadow-md);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-gradient);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 10px;
}

.step-icon {
    font-size: 2.2rem;
    margin-bottom: 6px;
    display: block;
}

.step-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.step-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* ===== TRUST BADGES ===== */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.trust-badges span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.trust-badges span:hover {
    border-color: rgba(37, 99, 235, 0.2);
    color: var(--text-primary);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 24px;
    margin-top: auto;
    transition: background var(--transition), border-color var(--transition);
}

.footer .logo-text {
    font-size: 1.1rem;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.footer-column h4 {
    color: var(--text-primary);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.footer-column a {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 4px 0;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--text-primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .transfer-box {
        padding: 24px 16px;
    }
    
    .drop-zone {
        padding: 32px 16px;
    }
    
    .link-box {
        flex-direction: column;
    }
    
    .steps-grid {
        flex-direction: column;
        align-items: stretch;
    }
    
    .step-card {
        max-width: 100%;
        width: 100%;
    }
    
    .step-arrow {
        transform: rotate(90deg);
        padding: 4px 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-links {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .trust-badges {
        gap: 10px;
    }
    
    .trust-badges span {
        font-size: 0.75rem;
        padding: 4px 12px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .btn-large {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .sidebar {
        width: 280px;
        left: -280px;
    }
}

/* ===== UTILITIES ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

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

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}
.delay-2 {
    animation-delay: 0.2s;
}
.delay-3 {
    animation-delay: 0.3s;
}
.delay-4 {
    animation-delay: 0.4s;
}

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