/* CSS Variables */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #252525;
    --accent-primary: #00ff88;
    --accent-secondary: #00cc6a;
    --accent-dark: #009955;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-tertiary: #999999;
    --star-color: #ffd700;
    --border-color: rgba(0, 255, 136, 0.3);
    --shadow-glow: 0 0 20px rgba(0, 255, 136, 0.3);
    --shadow-glow-strong: 0 0 30px rgba(0, 255, 136, 0.5);
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-glow);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.btn-nav {
    padding: 0.5rem 1.5rem;
    background: var(--accent-primary);
    color: #000000 !important;
    border-radius: 25px;
    font-weight: 600;
}

.btn-nav:hover {
    background: var(--accent-secondary);
    color: #000000 !important;
}

.btn-nav::after {
    display: none;
}

/* Login Button */
.btn-login {
    background: transparent !important;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary) !important;
    margin-left: 0.5rem;
}

.btn-login:hover {
    background: var(--accent-primary) !important;
    color: #000000 !important;
}

/* Hero Login Button */
.btn-hero-login {
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    padding: 0 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Web App Download Item */
.web-app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.btn-web-app {
    font-size: 1.2rem;
    padding: 1rem 2.5rem;
}

.web-app-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    display: block;
    position: relative;
    padding-top: 100px;
    padding-bottom: 3rem;
    overflow: visible;
}

.hero > .container {
    max-width: none;
    padding: 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, var(--star-color), transparent),
        radial-gradient(2px 2px at 60% 70%, var(--star-color), transparent),
        radial-gradient(1px 1px at 50% 50%, var(--star-color), transparent),
        radial-gradient(1px 1px at 80% 10%, var(--star-color), transparent),
        radial-gradient(2px 2px at 90% 60%, var(--star-color), transparent);
    background-size: 200% 200%;
    animation: stars 20s linear infinite;
    opacity: 0.3;
}

@keyframes stars {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

.hero-content {
    text-align: center;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 2rem 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero-title,
.hero-subtitle,
.hero-description,
.hero-buttons {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-title .star {
    color: var(--star-color);
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.hero-title .star:nth-child(2) {
    animation-delay: 0.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-subtitle {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: stretch;
}

.hero-buttons .download-badge {
    display: inline-block;
    transition: var(--transition);
    width: 180px !important;
    height: 60px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    flex-shrink: 0;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.hero-buttons .download-badge:hover {
    transform: translateY(-5px) scale(1.05);
}

.hero-buttons .download-badge img {
    position: absolute;
    top: 0;
    left: 0;
    height: 60px !important;
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    object-fit: fill;
    object-position: center;
    display: block;
    filter: drop-shadow(var(--shadow-glow));
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background: var(--accent-secondary);
    color: var(--text-primary);
    box-shadow: var(--shadow-glow-strong);
    transform: translateY(-2px);
}

/* Section Styles */
section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.section-title .star {
    color: var(--star-color);
    display: inline-block;
    margin: 0 0.5rem;
    animation: float 3s ease-in-out infinite;
}

/* How It Works Section */
.how-it-works {
    background: var(--bg-secondary);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding: 1rem 0;
}

.step {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    padding-top: 2.5rem;
    text-align: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: 10px;
}

.step::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.step:hover::before {
    left: 100%;
}

.step:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.step-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 60px;
    height: 60px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: var(--shadow-glow);
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.step-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Features Section */
.features {
    background: var(--bg-primary);
}

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

.feature-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Screenshots Section */
.screenshots {
    background: var(--bg-secondary);
}

.screenshots-grid {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
    height: 80vh;
    min-height: 600px;
    padding: 1rem;
    align-items: stretch;
}

.screenshot-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.screenshot-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.3);
    transform: translateY(-10px);
    z-index: 10;
}

.screenshot-image {
    position: relative;
    width: 100%;
    flex: 1;
    overflow: hidden;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.screenshot-card:hover .screenshot-image img {
    transform: scale(1.03);
}

.screenshot-overlay {
    display: none;
}

.screenshot-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem;
    padding: 0 1rem;
    color: var(--accent-primary);
    text-align: center;
}

.screenshot-description {
    color: var(--text-secondary);
    padding: 0 1rem 1rem;
    font-size: 0.9rem;
    text-align: center;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.98);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.lightbox.active {
    display: flex;
}

.lightbox-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.3s ease-out;
}

.lightbox-image {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
}

.lightbox-close:hover {
    background: var(--accent-secondary);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 255, 136, 0.8);
    color: var(--bg-primary);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    backdrop-filter: blur(10px);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--accent-primary);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2001;
}

.lightbox-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-dot.active {
    background: var(--accent-primary);
    width: 30px;
    border-radius: 5px;
}

/* Download Section */
.download {
    background: var(--bg-primary);
    text-align: center;
}

.download-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.download-buttons {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

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

.download-badge {
    display: inline-block;
    transition: var(--transition);
    width: 180px !important;
    height: 60px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    flex-shrink: 0;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.download-badge:hover {
    transform: translateY(-5px) scale(1.05);
}

.download-badge img {
    position: absolute;
    top: 0;
    left: 0;
    height: 60px !important;
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    object-fit: fill;
    object-position: center;
    display: block;
    filter: drop-shadow(var(--shadow-glow));
}

.qr-code-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-placeholder {
    width: 150px;
    height: 150px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.qr-code {
    width: 150px;
    height: 150px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    margin: 0 auto 1rem;
    display: block;
    background: white;
    padding: 5px;
}

.qr-code-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-heading {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transform: translateX(-100%);
        transition: var(--transition);
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .download-badge {
        width: 160px;
        height: 50px;
    }
    
    .hero-buttons .download-badge img {
        height: 50px;
        width: 160px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

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

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

    .screenshots-grid {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    
    .screenshot-card {
        height: 400px;
    }
    
    .screenshot-card:hover {
        flex: 1;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .download-badge {
        width: 160px;
        height: 50px;
    }
    
    .download-badge img {
        height: 50px;
        width: 160px;
    }

    .qr-codes {
        flex-direction: column;
        align-items: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 3rem 0;
    }

    .hero-content {
        padding: 1rem;
    }

    .step,
    .feature-card {
        padding: 1.5rem;
    }
}

/* Contest Page Styles */
.contest-prizes {
    background: var(--bg-secondary);
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.prize-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: visible;
}

.prize-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.prize-card.prize-gold {
    border-color: #ffd700;
}

.prize-card.prize-silver {
    border-color: #c0c0c0;
}

.prize-card.prize-bronze {
    border-color: #cd7f32;
}

.prize-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.prize-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
}

.prize-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.prize-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.prize-total {
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-top: 2rem;
}

.prize-total strong {
    color: var(--accent-primary);
    font-size: 2rem;
}

.how-to-participate {
    background: var(--bg-primary);
}

.participation-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.participation-step {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    padding-top: 2.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: visible;
}

.participation-step:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.participation-step .step-number {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 60px;
    height: 60px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: var(--shadow-glow);
}

.participation-step .step-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.participation-step .step-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.participation-step .step-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

.link-accent {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.link-accent:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.winners-selection {
    background: var(--bg-secondary);
}

.winners-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.info-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.info-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.info-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

.payout-details {
    background: var(--bg-primary);
}

.payout-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.payout-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.payout-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.payout-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.payout-text {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
}

.contest-rules {
    background: var(--bg-secondary);
}

.rules-list {
    max-width: 800px;
    margin: 3rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.rule-item {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.rule-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    transform: translateX(10px);
}

.rule-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.rule-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

.contest-tips {
    background: var(--bg-primary);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tip-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.tip-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.tip-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tip-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.tip-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.submit-entry {
    background: var(--bg-secondary);
    text-align: center;
}

.submit-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.submit-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid var(--accent-primary);
    background: transparent;
    color: var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* Contest Page Responsive */
@media (max-width: 768px) {
    .prizes-grid,
    .participation-steps,
    .winners-info,
    .payout-info,
    .tips-grid {
        grid-template-columns: 1fr;
    }

    .submit-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-secondary,
    .btn-primary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* Legal Pages (Terms of Service, Privacy Policy) */
.legal-page {
    padding: 120px 0 5rem;
    background: var(--bg-primary);
    min-height: 100vh;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.legal-title {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.legal-title .star {
    color: var(--star-color);
    display: inline-block;
    margin: 0 0.5rem;
    animation: float 3s ease-in-out infinite;
}

.legal-last-updated {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-bottom: 3rem;
    font-style: italic;
}

.legal-text {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.legal-text h2 {
    color: var(--accent-primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.legal-text h2:first-child {
    margin-top: 0;
}

.legal-text h3 {
    color: var(--accent-primary);
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.legal-text p {
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
}

.legal-text ul,
.legal-text ol {
    margin: 1.2rem 0;
    padding-left: 2rem;
}

.legal-text li {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

.legal-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-text a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

.legal-text a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .legal-content {
        padding: 1rem;
    }

    .legal-text {
        padding: 2rem 1.5rem;
    }

    .legal-text h2 {
        font-size: 1.5rem;
    }

    .legal-text h3 {
        font-size: 1.2rem;
    }
}

/* Video Preview Cards (viral.html) */
.viral-video-cards {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 1.5rem 0;
}

.viral-video-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.viral-video-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.viral-video-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.viral-video-card-header h3 {
    margin: 0 !important;
    font-size: 1.25rem !important;
}

.viral-video-card-body {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 1.25rem;
    align-items: flex-start;
}

.viral-video-preview {
    position: relative;
    flex-shrink: 0;
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

/* Fixed width for all previews - height calculated from aspect-ratio */
.viral-video-preview-embed,
.viral-video-preview-tiktok {
    width: 320px;
}

/* YouTube Shorts: vertical 9:16 - height = width * 16/9 */
.viral-video-preview-embed {
    aspect-ratio: 9 / 16;
}

/* TikTok: vertical 9:16 */
.viral-video-preview-tiktok {
    aspect-ratio: 9 / 16;
}

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

.viral-video-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}


.viral-video-preview-poster {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    transition: opacity 0.3s ease;
}

.viral-video-preview-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Semi-transparent overlay so Play button stands out on thumbnails (YouTube) */
.viral-video-poster-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

/* TikTok placeholder - no overlay, has own styled background */
.viral-video-poster-tiktok {
    background: linear-gradient(160deg, #0d0d0d 0%, #1a1a2e 50%, #16213e 100%);
}

.viral-video-tiktok-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    z-index: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.viral-video-tiktok-icon {
    width: 48px;
    height: 48px;
    opacity: 0.7;
}

.viral-video-preview-poster.hidden {
    opacity: 0;
    pointer-events: none;
}

.viral-video-play-btn {
    position: relative;
    z-index: 2;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(0, 255, 136, 0.9);
    border: 3px solid rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4);
}

.viral-video-play-btn:hover {
    transform: scale(1.08);
    background: var(--accent-primary);
    box-shadow: var(--shadow-glow-strong);
}

.viral-video-play-btn svg {
    width: 28px;
    height: 28px;
    margin-left: 4px;
    fill: var(--bg-primary);
}

.viral-video-stop-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 80, 80, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.viral-video-preview.playing .viral-video-stop-btn {
    display: flex;
}

/* TikTok iframe embed - fill container */
.viral-video-tiktok-embed {
    padding: 0;
    overflow: hidden;
}

.viral-video-tiktok-embed iframe {
    width: 100%;
    height: 100%;
}

.viral-video-stop-btn:hover {
    background: #ff5050;
    transform: scale(1.05);
}

.viral-video-stop-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.viral-video-embed-wrap {
    position: absolute;
    inset: 0;
    display: none;
}

.viral-video-preview.playing .viral-video-embed-wrap {
    display: block;
}

.viral-video-card-desc {
    flex: 1;
    min-width: 200px;
}

.viral-video-card-desc p {
    margin: 0 0 0.5rem 0 !important;
}

.viral-video-card-desc a {
    font-size: 0.9rem;
    word-break: break-all;
}

@media (max-width: 640px) {
    .viral-video-preview-embed,
    .viral-video-preview-tiktok {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .viral-video-card-body {
        flex-direction: column;
    }
}

/* Hero Banner Carousel - same as Trending screen */
/* Banner aspect ratio: 1920x312 */
.hero-banner-carousel {
    margin: 2rem 0 2.5rem;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 0 16px;
    box-sizing: border-box;
}

.hero-banner-track {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.hero-banner-track::-webkit-scrollbar {
    display: none;
}

.hero-banner-slide {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    text-decoration: none;
    display: block;
    overflow: hidden;
    border-radius: 28px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.hero-banner-slide img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    object-position: center;
    display: block;
    vertical-align: top;
    border-radius: 28px;
}

.hero-banner-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 8px;
}

.hero-banner-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: var(--text-tertiary);
    cursor: pointer;
    transition: var(--transition);
}

.hero-banner-dots .dot.active {
    width: 20px;
    background: var(--accent-primary);
}

.hero-banner-dots .dot:hover {
    background: var(--text-secondary);
}

@media (max-width: 600px) {
    .hero-banner-carousel {
        margin: 1.5rem 0 2rem;
        padding: 0 12px;
    }
    
    .hero-banner-slide {
        border-radius: 24px;
    }
    
    .hero-banner-slide img {
        /* Same as Trending: height = width / (1920/312) for full banner */
        height: auto;
        aspect-ratio: 1920 / 312;
        object-fit: cover;
        object-position: center;
        border-radius: 24px;
    }
}

/* Motion Library Preview in Hero */
.motion-library-preview {
    margin: 3rem 0;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}

.public-profile-summary {
    margin: 1rem auto 2rem;
    max-width: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.public-profile-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.public-follow-btn {
    min-width: 120px;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
}

.motion-library-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.motion-library-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--accent-primary);
    margin: 0;
}

.motion-library-sort {
    display: flex;
    gap: 0.75rem;
}

.sort-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.sort-btn:hover {
    border-color: var(--accent-primary);
}

.sort-btn.active {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    font-weight: 600;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

/* Tags filter row - horizontal scroll */
.motion-library-tags-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.motion-library-tags-row::-webkit-scrollbar {
    display: none;
}

.motion-library-tags-row .tag-chip {
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    padding: 0.25rem 0;
}

.motion-library-tags-row .tag-chip:hover {
    color: var(--accent-primary);
}

.motion-library-tags-row .tag-chip.active {
    color: var(--accent-primary);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}

.motion-library-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 0.5rem;
    padding-bottom: 2rem;
}

.motion-library-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Video Thumbnail Card */
.video-thumbnail {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-glow);
}

.video-thumbnail:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-strong);
}

.video-thumbnail .thumbnail-image {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.video-thumbnail .thumbnail-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-thumbnail .thumbnail-video.loaded {
    opacity: 1;
}

.video-thumbnail .thumbnail-video.loaded + .thumbnail-image,
.video-thumbnail.video-ready .thumbnail-image {
    opacity: 0;
}

.video-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: white;
}

.video-badge-icon {
    font-size: 12px;
}

/* Video Preview Modal */
.video-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-preview-modal.active {
    display: flex;
}

.video-preview-content {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    max-width: 720px;
    max-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-glow-strong);
}

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

.video-preview-header h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.video-preview-back {
    background: transparent;
    border: none;
    color: var(--accent-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.video-preview-back:hover {
    transform: translateX(-3px);
}

.video-preview-close {
    background: transparent;
    border: none;
    color: var(--accent-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.video-preview-close:hover {
    transform: scale(1.1);
}

.video-preview-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.video-preview-player {
    position: relative;
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-glow);
    background: var(--bg-primary);
}

.video-preview-player video {
    width: 100%;
    height: auto;
    display: block;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-glow);
}

.video-play-overlay:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-play-icon {
    font-size: 2rem;
    color: var(--text-primary);
    margin-left: 4px;
}

.video-usage-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-primary);
}

.video-original-link {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1.5px solid var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-glow);
}

.video-original-link:hover {
    background: rgba(0, 255, 136, 0.2);
}

.video-preview-actions {
    margin-top: 1rem;
    width: 100%;
    max-width: 400px;
}

.btn-use-video {
    width: 100%;
    padding: 1rem;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-glow);
}

.btn-use-video:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-strong);
}

/* Responsive для Motion Library */
@media (max-width: 1400px) {
    .motion-library-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .motion-library-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .motion-library-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .motion-library-preview {
        padding: 0 0.5rem;
    }
    
    .motion-library-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .motion-library-title {
        font-size: clamp(1.2rem, 3vw, 1.5rem);
    }
    
    .video-preview-content {
        max-height: 95vh;
    }
    
    .video-preview-header {
        padding: 0.75rem 1rem;
    }
    
    .video-preview-header h3 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .motion-library-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .motion-library-title {
        font-size: clamp(1rem, 3vw, 1.25rem);
    }
    
    .sort-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .hero-buttons,
    .download-buttons {
        display: none;
    }
}

