:root {
    --bg-void: #05070a;
    --bg-glass: rgba(12, 17, 28, 0.7);
    --bg-glass-hover: rgba(20, 26, 41, 0.85);
    --border-glass: rgba(255, 255, 255, 0.08);
    --cyan: #00e5ff;
    --cyan-glow: rgba(0, 229, 255, 0.4);
    --violet: #8a2be2;
    --violet-glow: rgba(138, 43, 226, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --rose: #f43f5e;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-void);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background Effects */
.bg-grid {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}
.bg-orb--cyan {
    width: 400px; height: 400px;
    background: var(--cyan-glow);
    top: -10%; left: -5%;
}
.bg-orb--violet {
    width: 350px; height: 350px;
    background: var(--violet-glow);
    bottom: 10%; right: -5%;
    animation-delay: -5s;
}

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

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    padding: 24px 0;
}
.nav-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -1px;
}
.nav-logo span { color: var(--cyan); }

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

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-main);
}

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Glass Card */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.text-center { text-align: center; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 24px; }
.mt-4 { margin-top: 24px; }

h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
p { color: var(--text-muted); }

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-glass);
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.02);
    margin: 32px 0;
}
.upload-area:hover, .upload-area.dragover {
    border-color: var(--cyan);
    background: rgba(0, 229, 255, 0.05);
}
.upload-icon {
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--cyan-glow);
}
.upload-icon svg {
    width: 32px; height: 32px;
    stroke: #fff; stroke-width: 2;
    fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.upload-text { font-size: 18px; font-weight: 500; color: var(--text-main); margin-bottom: 8px; }
.upload-hint { font-size: 14px; color: var(--text-muted); }

/* Progress & State */
.hidden { display: none !important; }
.progress-container {
    margin-top: 32px;
}
.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}
.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--cyan), var(--violet));
    border-radius: 4px;
    transition: width 0.2s ease;
}
.progress-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--cyan);
}

/* Result Area */
.result-area {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 24px;
    margin-top: 32px;
    border: 1px solid var(--border-glass);
}
.result-url {
    background: var(--bg-void);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    font-family: monospace;
    font-size: 16px;
    color: var(--cyan);
    word-break: break-all;
    margin-bottom: 16px;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--violet-glow);
}
.btn-primary svg {
    width: 18px; height: 18px;
    stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round;
}

/* Download Page */
.success-icon svg {
    width: 64px; height: 64px;
    stroke: var(--cyan); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round;
    filter: drop-shadow(0 0 10px var(--cyan-glow));
}
.error-icon svg {
    width: 64px; height: 64px;
    stroke: var(--rose); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round;
    filter: drop-shadow(0 0 10px rgba(244,63,94,0.4));
}
.file-title { font-size: 24px; word-break: break-all; }
.file-meta {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    text-align: left;
}
.meta-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.meta-item:last-child { border-bottom: none; }
.meta-label { color: var(--text-muted); }
.meta-value { font-weight: 600; color: var(--text-main); }
.security-note { font-size: 13px; opacity: 0.7; }

/* Responsive */
@media (max-width: 768px) {
    .card { padding: 30px 20px; }
    h1 { font-size: 26px; }
    .upload-area { padding: 40px 16px; }
}

/* Footer Link */
.xhtml-link { text-decoration: none; color: #18bc9c; font-weight: 700; transition: opacity 0.2s ease; }
.xhtml-link:hover { opacity: 0.8; }
.xhtml-link span { color: #ffffff; }
