:root {
    --bg-color: #0a0a0a;
    --text-color: #f0f0f0;
    --primary: #ff00ff;
    --secondary: #00ffff; 
    --accent: #ffff00;
    --glass-bg: rgba(20, 20, 20, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --font-heading: 'Bebas Neue', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(255, 0, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 75%, rgba(0, 255, 255, 0.15) 0%, transparent 40%);
    background-attachment: fixed;
}

body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}

body::before {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--primary), transparent);
    animation: float 20s infinite ease-in-out;
}

body::after {
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--secondary), transparent);
    animation: float 25s infinite ease-in-out reverse;
}

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

.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MDAiIGhlaWdodD0iNTAwIj48ZmlsdGVyIGlkPSJnoiPjxmZVR1cmJ1bGVuY2UgdHlwZT0iZnJhY3RhbE5vaXNlIiBiYXNlRnJlcXVlbmN5PSIwLjY1IiBudW1PY3RhdmVzPSIzIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI2cpIiBvcGFjaXR5PSIwLjAzIi8+PC9zdmc+');
    pointer-events: none;
    z-index: 999;
    opacity: 0.7;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 3rem;
    position: relative;
    z-index: 1;

    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}


header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1.5rem;
}

.header-right-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end; 
    gap: 12px;
}

.header-video-btn {
    display: inline-block;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    letter-spacing: 1px;

    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--secondary);
    color: var(--secondary);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
    
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}


.header-video-btn:hover {
    background: rgba(0, 255, 255, 0.15);
    color: #fff;
    box-shadow: 0 0 20px var(--secondary);
    transform: translateY(-2px);
    text-shadow: 0 0 5px var(--secondary);
}


@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .header-right-group {
        align-items: center; 
    }
}

h1.glitch {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    margin: 0;
    line-height: 1;
    color: #fff;
    position: relative;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

h1.glitch::before, h1.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent; 
}

h1.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--primary);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 4s infinite linear alternate-reverse;
}

h1.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--secondary);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 3.5s infinite linear alternate-reverse;
}

.status-indicator {
    font-size: 0.9rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

#system-status {
    color: var(--secondary);
    text-shadow: 0 0 10px var(--secondary);
    animation: blink 2s infinite ease-in-out;
}

.controls {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.select-wrapper {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.select-wrapper:hover {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.2);
}

.select-wrapper label {
    color: #888;
    padding: 0 0.5rem;
    font-size: 0.8rem;
    font-weight: normal;
    display: block;
    margin-bottom: 0.2rem;
}

select {
    appearance: none;
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    padding: 0.2rem 2rem 0.2rem 0.5rem;
    cursor: pointer;
    font-weight: bold;
    outline: none;
    width: 100%;
}

select option {
    background-color: #000;
    color: #fff;
    padding: 10px;
}

.drop-zone {
    border: 3px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--secondary);
    background: rgba(0, 255, 255, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.drop-content .icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.drop-zone:hover .icon {
    transform: scale(1.2) rotate(-10deg);
    color: var(--secondary);
    text-shadow: 0 0 20px var(--secondary);
}

.drop-content h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin: 0;
    letter-spacing: 2px;
    background: linear-gradient(45deg, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.drop-content p {
    margin: 1rem 0 0;
    opacity: 0.6;
    font-size: 0.9rem;
}

.upload-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.upload-item {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    align-items: center;
    gap: 1.5rem;
    animation: slideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(5px);
    transition: transform 0.3s;
}

.upload-item:hover {
    transform: scale(1.01);
    background: rgba(0, 0, 0, 0.4);
}

.preview-box {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.preview-box:hover .preview-img {
    transform: scale(1.1);
}

.info-box {
    flex-grow: 1;
    overflow: hidden;
}

.filename {
    font-weight: bold;
    margin-bottom: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    font-size: 1.1rem;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    width: 100%;
    margin-bottom: 0.8rem;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease-out;
    border-radius: 10px;
    box-shadow: 0 0 15px var(--primary);
}

.status-text {
    font-size: 0.85rem;
    color: #aaa;
    font-weight: 500;
}

.result-box {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.url-input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--secondary);
    padding: 0.6rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.url-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

button.copy-btn, a.view-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
    letter-spacing: 1px;
}

button.copy-btn:hover, a.view-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.4);
    transform: translateY(-2px);
}

a.view-btn:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

footer {
    margin-top: 4rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

@keyframes glitch-anim {
    0% { clip: rect(30px, 9999px, 10px, 0); transform: skew(0.85deg); }
    5% { clip: rect(80px, 9999px, 90px, 0); transform: skew(-0.5deg); }
    10% { clip: rect(10px, 9999px, 40px, 0); transform: skew(0.2deg); }
    15% { clip: rect(50px, 9999px, 20px, 0); transform: skew(0.1deg); }
    20% { clip: rect(20px, 9999px, 70px, 0); transform: skew(0.5deg); }
    100% { clip: rect(60px, 9999px, 30px, 0); transform: skew(0deg); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(60px, 9999px, 10px, 0); transform: skew(0.85deg); }
    5% { clip: rect(20px, 9999px, 90px, 0); transform: skew(-0.5deg); }
    10% { clip: rect(50px, 9999px, 40px, 0); transform: skew(0.2deg); }
    15% { clip: rect(10px, 9999px, 20px, 0); transform: skew(0.1deg); }
    20% { clip: rect(80px, 9999px, 70px, 0); transform: skew(0.5deg); }
    100% { clip: rect(30px, 9999px, 30px, 0); transform: skew(0deg); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

@media (max-width: 600px) {
    .container { padding: 1.5rem; margin: 20px 10px; }
    h1.glitch { font-size: 3rem; }
    .drop-content h2 { font-size: 2rem; }
    .upload-item { flex-direction: column; align-items: stretch; }
    .preview-box { width: 100%; height: 200px; }
    .result-box { flex-direction: column; }
    button.copy-btn, a.view-btn { justify-content: center; padding: 0.8rem; }
}

.selection-container {
    width: 100%;
    text-align: center;
}
.selection-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin: 0 0 1rem 0;
    color: var(--text-color);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    position: relative;
    display: inline-block;
}

.selection-title::before,
.selection-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 2px;
    background: var(--glass-border);
    transition: width 0.3s ease;
}
.selection-title::before { right: 100%; margin-right: 15px; }
.selection-title::after { left: 100%; margin-left: 15px; }
.selection-container:hover .selection-title::before,
.selection-container:hover .selection-title::after {
    width: 60px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.api-buttons-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0.5rem;
}

.api-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    color: #888;
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}
.api-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.api-btn.active {
    background: rgba(255, 0, 255, 0.15);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
    text-shadow: 0 0 5px var(--primary);
    font-weight: bold;
}

.api-btn.active::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 2px; height: 100%;
    background: var(--primary);
    box-shadow: 2px 0 10px var(--primary);
}

@media (max-width: 600px) {
    .api-buttons-group {
        gap: 8px;
    }
    .api-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        flex-grow: 1;
        min-width: 80px;
    }
}