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

:root {
    --red: #ff0000;
    --dark-red: #cc0000;
    --black: #000000;
    --dark-gray: #0a0a0a;
    --mid-gray: #1a1a1a;
    --light-gray: #2a2a2a;
    --white: #ffffff;
    --off-white: #f0f0f0;
}

body {
    font-family: 'Arial', sans-serif;
    background: var(--black);
    color: var(--white);
    overflow-x: hidden;
    position: relative;
}

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

/* Scanning Line Effect */
.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    animation: scan 8s linear infinite;
    z-index: -1;
    opacity: 0.6;
}

@keyframes scan {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(180deg, var(--black) 0%, transparent 100%);
    z-index: 1000;
    padding: 1rem 0;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-lang-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    position: relative;
}

.logo-icon::before,
.logo-icon::after {
    content: '';
    position: absolute;
    border: 2px solid var(--red);
}

.logo-icon::before {
    width: 100%;
    height: 100%;
    transform: rotate(45deg);
    border-radius: 4px;
}

.logo-icon::after {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    background: var(--red);
    clip-path: polygon(40% 20%, 40% 80%, 70% 50%);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: -0.5px;
    color: var(--white);
}

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

/* Language Selector */
.lang-selector {
    padding-left: 1.5rem;
    border-left: 2px solid var(--light-gray);
}

.lang-toggle {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 4px;
    border: 2px solid var(--red);
    border-radius: 4px;
    background: var(--black);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.lang-current img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.lang-current:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--black);
    border: 2px solid var(--light-gray);
    border-radius: 4px;
    padding: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 8px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--light-gray);
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 4px;
    border: 2px solid var(--light-gray);
    border-radius: 4px;
    transition: all 0.3s;
    text-decoration: none;
}

.lang-option img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.lang-option:hover {
    border-color: var(--red);
    transform: scale(1.1);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transition: transform 0.3s;
}

nav a:hover {
    color: var(--red);
}

nav a:hover::after {
    transform: scaleX(1);
}

/* Main Content */
main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    position: relative;
}

.hero-section {
    max-width: 1200px;
    width: 100%;
    text-align: center;
}

/* Tech Frame */
.tech-frame {
    position: relative;
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: var(--dark-gray);
    clip-path: polygon(
        0 20px, 20px 0,
        100% 0, 100% calc(100% - 20px),
        calc(100% - 20px) 100%, 0 100%
    );
}

.tech-frame::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--black);
    clip-path: polygon(
        0 20px, 20px 0,
        100% 0, 100% calc(100% - 20px),
        calc(100% - 20px) 100%, 0 100%
    );
    z-index: -1;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.headline-main {
    color: var(--white);
}

.headline-accent {
    color: var(--red);
    display: block;
    font-size: 0.8em;
}

.tagline {
    font-size: 1.2rem;
    color: var(--off-white);
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2px;
    background: var(--red);
    padding: 2px;
    margin-bottom: 3rem;
}

.stat {
    background: var(--black);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,0,0,0.2), transparent);
    animation: shimmer 3s infinite;
    animation-delay: var(--delay);
}

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

.stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--red);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--off-white);
}

/* Download Interface */
.download-interface {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.interface-header {
    background: var(--mid-gray);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid var(--red);
}

.status-dot {
    width: 12px;
    height: 12px;
    background: var(--red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.interface-body {
    background: linear-gradient(180deg, var(--dark-gray) 0%, var(--black) 100%);
    padding: 2rem;
    border: 1px solid var(--light-gray);
    border-top: none;
}

.url-input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.url-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--black);
    border: 2px solid var(--light-gray);
    color: var(--white);
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s;
}

.url-input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 1px var(--red);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--red);
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%);
}

.btn-primary:hover {
    background: var(--dark-red);
    transform: translateX(5px);
}

.btn-primary[disabled] {
    background: var(--light-gray);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--light-gray);
}

.btn-secondary:hover {
    border-color: var(--red);
    color: var(--red);
}

/* Error Message */
.error-message {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid var(--red);
    color: var(--red);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    text-align: center;
}

/* Preview Panel */
.preview-panel {
    display: none;
    margin-top: 2rem;
    background: var(--dark-gray);
    border: 1px solid var(--light-gray);
    padding: 1.5rem;
    position: relative;
}

.preview-panel.active {
    display: block;
    animation: slideDown 0.5s ease-out;
}

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

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

.preview-title {
    font-size: 1.2rem;
    font-weight: bold;
}

.preview-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.video-thumb {
    position: relative;
    background: var(--black);
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
}

.play-icon {
    width: 60px;
    height: 60px;
    background: var(--red);
    clip-path: polygon(30% 20%, 30% 80%, 80% 50%);
}

.video-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--off-white);
}

.detail-icon {
    color: var(--red);
}

/* Ad Space */
.ad-container {
    background: repeating-linear-gradient(
        45deg,
        var(--dark-gray),
        var(--dark-gray) 10px,
        var(--light-gray) 10px,
        var(--light-gray) 20px
    );
    padding: 2px;
    margin-top: 1rem;
}

.ad-content {
    background: var(--black);
    padding: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--off-white);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Features */
.features-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, var(--black) 0%, var(--dark-gray) 100%);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--red);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--black);
    border: 1px solid var(--light-gray);
    padding: 2rem;
    position: relative;
    transition: all 0.3s;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    background: var(--red);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    border-color: var(--red);
    transform: translateY(-5px);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--red);
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.feature-desc {
    color: var(--off-white);
    line-height: 1.6;
}

/* Footer */
footer {
    background: var(--black);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--light-gray);
}

.footer-content {
    color: var(--off-white);
    font-size: 0.9rem;
}

.footer-content a {
    color: var(--off-white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-content a:hover {
    color: var(--red);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .logo-lang-wrapper {
        gap: 1rem;
    }

    .lang-selector {
        padding-left: 1rem;
    }

    .lang-current {
        width: 28px;
        height: 28px;
    }

    .lang-option {
        width: 28px;
        height: 28px;
    }

    nav ul {
        display: none;
    }

    .stats-bar {
        grid-template-columns: 1fr;
    }

    .preview-content {
        grid-template-columns: 1fr;
    }
    
    .video-details h3 {
        margin-top: 1rem;
    }

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

    .action-buttons {
        grid-template-columns: 1fr;
    }

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