:root {
    --bg-primary: #030712;
    --bg-card: rgba(15, 19, 28, 0.95);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --purple-400: #c084fc;
    --green-400: #4ade80;
    --red-400: #f87171;
    --yellow-400: #fbbf24;
    --border-color: rgba(34, 211, 238, 0.08);
    --border-hover: rgba(34, 211, 238, 0.2);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated Particle Background */
.particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* Grid Background */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image: 
        linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Gradient Orbs */
.gradient-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.1;
    animation: float 15s infinite ease-in-out;
}

.orb-1 {
    top: 0;
    left: 25%;
    width: 500px;
    height: 500px;
    background: var(--cyan-500);
    animation-duration: 8s;
}

.orb-2 {
    top: 33%;
    right: 25%;
    width: 400px;
    height: 400px;
    background: var(--blue-500);
    animation-duration: 10s;
    animation-delay: 2s;
}

.orb-3 {
    bottom: 0;
    left: 50%;
    width: 600px;
    height: 600px;
    background: var(--purple-400);
    animation-duration: 12s;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -30px); }
    66% { transform: translate(-30px, 30px); }
}

/* Container */
.container {
    width: 100%;
    max-width: 36rem;
    position: relative;
    z-index: 1;
}

/* Header Badge */
.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: rgba(34, 211, 238, 0.05);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--cyan-400);
    transition: all 0.3s ease;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.header-badge:hover {
    border-color: var(--border-hover);
    background: rgba(34, 211, 238, 0.1);
    transform: translateX(-50%) translateY(-2px);
}

.badge-icon {
    width: 16px;
    height: 16px;
}

/* Card */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    box-shadow: 
        0 0 0 1px rgba(34, 211, 238, 0.1),
        0 20px 60px -12px rgba(0, 0, 0, 0.8),
        0 0 100px rgba(34, 211, 238, 0.1);
    overflow: hidden;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out;
}

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

.card:hover {
    border-color: var(--border-hover);
    box-shadow: 
        0 0 0 1px rgba(34, 211, 238, 0.2),
        0 30px 80px -12px rgba(0, 0, 0, 0.9),
        0 0 150px rgba(34, 211, 238, 0.2);
    transform: translateY(-4px);
}

/* Card Shimmer - SMOOTH LOOP WITHOUT TELEPORTING */
.card-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    overflow: hidden;
}

.card-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(34, 211, 238, 0.2) 20%,
        rgba(34, 211, 238, 0.8) 50%,
        rgba(34, 211, 238, 0.2) 80%,
        transparent 100%
    );
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { 
        left: -100%;
    }
    100% { 
        left: 100%;
    }
}

/* Corner Decorations */
.corner-decoration {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--cyan-400);
    opacity: 0.3;
}

.corner-tl {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.corner-tr {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
}

.corner-bl {
    bottom: 20px;
    left: 20px;
    border-right: none;
    border-top: none;
}

.corner-br {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
}

/* Card Header */
.card-header {
    padding: 3rem 2.5rem 2rem;
    background: linear-gradient(180deg, 
        rgba(34, 211, 238, 0.05) 0%, 
        transparent 100%
    );
    text-align: center;
}

.card-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.title-text {
    display: block;
    background: linear-gradient(135deg, #ffffff 0%, #e5e7eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-gradient {
    display: block;
    background: linear-gradient(135deg, var(--cyan-400) 0%, var(--blue-400) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(34, 211, 238, 0.3));
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.card-description {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.6;
}

/* Card Content */
.card-content {
    padding: 2rem 2.5rem 2.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--cyan-400);
    z-index: 2;
    transition: all 0.3s ease;
}

.input {
    width: 100%;
    height: 3.25rem;
    padding: 0 1rem 0 3rem;
    border-radius: 0.75rem;
    border: 2px solid var(--border-color);
    background: rgba(10, 13, 20, 0.6);
    backdrop-filter: blur(10px);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.input:focus {
    outline: none;
    border-color: var(--cyan-400);
    background: rgba(10, 13, 20, 0.8);
    box-shadow: 
        0 0 0 3px rgba(34, 211, 238, 0.1),
        0 0 30px rgba(34, 211, 238, 0.2);
    transform: translateY(-2px);
}

.input:focus ~ .input-icon {
    color: var(--cyan-400);
    transform: translateY(-50%) scale(1.1);
}

/* Button */
.button {
    position: relative;
    width: 100%;
    height: 3.25rem;
    padding: 0 2rem;
    border-radius: 0.75rem;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.button-primary {
    background: linear-gradient(135deg, var(--cyan-500) 0%, var(--blue-500) 100%);
    color: white;
    box-shadow: 
        0 4px 20px rgba(34, 211, 238, 0.3),
        0 0 40px rgba(34, 211, 238, 0.1);
}

.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 30px rgba(34, 211, 238, 0.4),
        0 0 60px rgba(34, 211, 238, 0.2);
}

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

.button-text {
    position: relative;
    z-index: 2;
}

.button-icon {
    width: 18px;
    height: 18px;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.button:hover .button-icon {
    transform: scale(1.1);
}

/* Success Button */
.button-success {
    background: linear-gradient(135deg, var(--green-400) 0%, #22c55e 100%);
    box-shadow: 
        0 4px 20px rgba(34, 197, 94, 0.3),
        0 0 40px rgba(34, 197, 94, 0.1);
}

.button-success:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 30px rgba(34, 197, 94, 0.4),
        0 0 60px rgba(34, 197, 94, 0.2);
}

/* Status & Download Containers */
.status-container,
.download-container {
    margin-top: 1.5rem;
}

/* Alert */
.alert {
    border-radius: 0.75rem;
    border: 1px solid;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(15px);
    font-weight: 600;
    font-size: 0.9375rem;
    animation: slideIn 0.3s ease-out;
}

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

.alert-processing {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.08);
    color: var(--yellow-400);
}

.alert-success {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.08);
    color: var(--green-400);
}

.alert-destructive {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.08);
    color: var(--red-400);
}

.icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

.spinner {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-right-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(34, 211, 238, 0.15);
}

.stat-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.75rem;
    padding: 0.625rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-icon-cyan {
    background: linear-gradient(135deg, var(--cyan-500), var(--cyan-400));
}

.stat-icon-blue {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
}

.stat-icon-purple {
    background: linear-gradient(135deg, #a855f7, var(--purple-400));
}

.stat-icon svg {
    width: 100%;
    height: 100%;
    color: white;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--cyan-400), var(--blue-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(3, 7, 18, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--cyan-400);
}

.footer-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.footer-link:hover .footer-icon {
    transform: rotate(20deg) scale(1.1);
}

.footer-link strong {
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan-400), var(--blue-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(34, 211, 238, 0.1);
    border-top-color: var(--cyan-400);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 
        0 0 30px rgba(34, 211, 238, 0.3);
}

.preloader-text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--cyan-400);
    letter-spacing: 0.025em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-title {
        font-size: 2.25rem;
    }
    
    .card-header {
        padding: 2.5rem 1.75rem 1.5rem;
    }
    
    .card-content {
        padding: 1.5rem 1.75rem 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem 0.75rem;
    }
    
    .card-title {
        font-size: 2rem;
    }
    
    .card-description {
        font-size: 0.9375rem;
    }
    
    .input,
    .button {
        height: 3rem;
        font-size: 0.9375rem;
    }
    
    .header-badge {
        font-size: 0.8125rem;
        padding: 0.375rem 0.875rem;
    }
}
