:root {
    --bg-primary: #0A0A0A;
    --bg-secondary: #1A1A1A;
    --bg-tertiary: #2A2A2A;
    --accent-orange: #FF6B2B;
    --accent-yellow: #CCFF00;
    --accent-pink: #FF3CAC;
    --accent-cyan: #00D4FF;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --text-muted: #707070;
    --border-color: #333333;
    --glow-orange: rgba(255, 107, 43, 0.4);
    --glow-yellow: rgba(204, 255, 0, 0.3);
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(255, 107, 43, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(204, 255, 0, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 60, 172, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -2;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.75rem;
    filter: drop-shadow(0 0 10px var(--accent-orange));
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-orange);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-orange);
    transition: width 0.3s ease;
}

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

.main-content {
    padding-top: 100px;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.hero-section {
    text-align: center;
    padding: 6rem 0 4rem;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-yellow), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-orange);
}

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

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.upload-section {
    padding: 4rem 0;
}

.upload-container {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--bg-secondary);
}

.upload-zone:hover {
    border-color: var(--accent-orange);
    background: rgba(255, 107, 43, 0.05);
}

.upload-zone.dragover {
    border-color: var(--accent-yellow);
    background: rgba(204, 255, 0, 0.05);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-subtext {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.upload-btn {
    background: linear-gradient(135deg, var(--accent-orange), #FF8C42);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--glow-orange);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--glow-orange);
}

.upload-preview {
    margin-top: 2rem;
}

.upload-preview video {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.video-info {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.size-selector {
    max-width: 800px;
    margin: 0 auto;
}

.selector-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.size-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.size-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-option:hover {
    border-color: var(--accent-orange);
    transform: translateY(-2px);
}

.size-option.active {
    border-color: var(--accent-orange);
    background: rgba(255, 107, 43, 0.1);
    box-shadow: 0 0 20px var(--glow-orange);
}

.size-preview {
    width: 60px;
    height: 60px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    margin-bottom: 0.75rem;
    position: relative;
}

.size-preview.vertical {
    width: 30px;
    height: 60px;
}

.size-preview.horizontal {
    width: 60px;
    height: 34px;
}

.size-preview.square {
    width: 50px;
    height: 50px;
}

.size-preview.portrait {
    width: 40px;
    height: 50px;
}

.size-label {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.size-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.analysis-section {
    padding: 4rem 0;
}

.analysis-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.analysis-video video {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.timeline-scrubber {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.timeline-track {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.timeline-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-yellow));
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.timeline-markers {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.timeline-marker {
    padding: 0.25rem 0.75rem;
    background: var(--accent-orange);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timeline-marker:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px var(--glow-orange);
}

.analysis-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.analysis-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--accent-orange);
}

.moments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.moment-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.moment-item:hover {
    background: rgba(255, 107, 43, 0.1);
    border: 1px solid var(--accent-orange);
}

.moment-time {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    color: var(--accent-yellow);
    min-width: 60px;
}

.moment-label {
    font-size: 0.9rem;
}

.engagement-meter {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.meter-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.meter-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-yellow));
    border-radius: 4px;
    transition: width 1s ease;
}

.meter-value {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--accent-yellow);
    min-width: 50px;
    text-align: right;
}

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

.color-palette {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.1);
    border-color: white;
}

.generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0 auto;
    padding: 1.25rem 3rem;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(255, 107, 43, 0.4);
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(255, 107, 43, 0.5);
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.25rem;
}

.youtube-section {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
}

.youtube-search {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 20px var(--glow-orange);
}

.search-btn {
    padding: 1rem 2rem;
    background: var(--accent-orange);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #FF8C42;
    transform: translateY(-2px);
}

.youtube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.youtube-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.youtube-card:hover {
    transform: translateY(-5px);
}

.thumbnail-placeholder {
    aspect-ratio: 9/16;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.thumbnail-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.thumbnail-views {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.thumbnail-meta {
    margin-top: 0.75rem;
}

.meta-title {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.meta-stats {
    font-size: 0.8rem;
    color: var(--accent-yellow);
}

.thumbnails-section {
    padding: 4rem 0;
}

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

.generated-thumbnail {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

.generated-thumbnail:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
}

.generated-thumbnail canvas {
    width: 100%;
    display: block;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.generated-thumbnail:hover .thumbnail-overlay {
    opacity: 1;
}

.overlay-btn {
    padding: 0.75rem 1.5rem;
    margin: 0.5rem;
    background: var(--accent-orange);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.overlay-btn:hover {
    background: #FF8C42;
    transform: scale(1.05);
}

.thumbnails-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.action-btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(255, 107, 43, 0.4);
}

.action-btn.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.action-btn:hover {
    transform: translateY(-2px);
}

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

@media (max-width: 768px) {
    .site-header {
        padding: 1rem 1.5rem;
    }
    
    .main-nav {
        display: none;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .analysis-container {
        grid-template-columns: 1fr;
    }
    
    .size-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .youtube-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
