/* Root Variables */
:root {
    --primary-color: #fec500;
    --secondary-color: #fec500;
    --accent-color: #fec500;
    --dark-bg: #000000;
    --darker-bg: #000000;
    --light-text: #ffffff;
    --muted-text: #888888;
    --gradient-1: linear-gradient(135deg, #fec500 0%, #ff9500 100%);
    --gradient-2: linear-gradient(135deg, #fec500 0%, #ff9500 100%);
    --gradient-3: linear-gradient(135deg, #fec500 0%, #ff9500 100%);
    --warning-color: #fec500;
    --danger-color: #fec500;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Montserrat', 'Poppins', sans-serif;
    background: var(--darker-bg);
    color: var(--light-text);
}

body {
    position: relative;
    background: radial-gradient(ellipse at center, #1a1a1a 0%, #0a0a0a 50%, #000000 100%);
}

/* Container */
.container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 2rem;
    overflow: hidden;
}

/* Film Strip Decoration */
.film-strip {
    position: absolute;
    left: 0;
    right: 0;
    height: 60px;
    background: repeating-linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.8) 0px,
        rgba(0, 0, 0, 0.8) 20px,
        transparent 20px,
        transparent 40px
    );
    z-index: 1;
    pointer-events: none;
}

.film-strip-top {
    top: 0;
}

.film-strip-bottom {
    bottom: 0;
}

/* Header */
.header {
    position: relative;
    z-index: 10;
    padding: 1rem 0;
    text-align: center;
    border-bottom: 2px solid rgba(254, 197, 0, 0.3);
    margin-bottom: 1.5rem;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    position: relative;
    width: 100%;
}

.logo {
    height: 100px;
    width: auto;
    filter: drop-shadow(0 8px 20px rgba(254, 197, 0, 0.6)) 
            drop-shadow(0 0 30px rgba(254, 197, 0, 0.4));
    animation: logoGlow 3s ease-in-out infinite;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 10;
}

.logo:hover {
    transform: scale(1.05);
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 8px 20px rgba(254, 197, 0, 0.6)) 
                drop-shadow(0 0 30px rgba(254, 197, 0, 0.4));
    }
    50% {
        filter: drop-shadow(0 8px 30px rgba(254, 197, 0, 0.9)) 
                drop-shadow(0 0 50px rgba(254, 197, 0, 0.7))
                drop-shadow(0 0 70px rgba(255, 149, 0, 0.5));
    }
}

/* Date and Time Display */
.date-time-display {
    position: fixed;
    top: 4rem;
    left: 2rem;
    text-align: left;
    z-index: 100;
}

.date {
    font-size: 1.2rem;
    color: var(--muted-text);
    font-weight: 600;
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
}

.time {
    font-size: 1.5rem;
    color: var(--light-text);
    font-weight: 700;
    font-family: 'Montserrat', monospace;
    letter-spacing: 2px;
}


/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    gap: 3rem;
    padding-bottom: 2rem;
}

/* Batch Display */
.batch-display {
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

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

.batch-info {
    margin-bottom: 3rem;
}

.batch-label {
    font-size: 1.5rem;
    color: var(--muted-text);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.batch-name {
    font-size: 4.5rem;
    font-weight: 800;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    text-shadow: 0 0 30px rgba(254, 197, 0, 0.3);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Timer Container */
.timer-container {
    margin-top: 2rem;
}

.timer-label {
    font-size: 1.8rem;
    color: var(--muted-text);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.timer {
    font-size: 8rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(254, 197, 0, 0.5);
    letter-spacing: 2px;
    transition: all 0.3s ease;
    line-height: 1.2;
}

.timer.warning {
    background: linear-gradient(135deg, #fec500 0%, #ff9500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.timer.ended {
    color: var(--danger-color);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Next Batch Preview */
.next-batch-preview {
    position: fixed;
    top: 4rem;
    right: 2rem;
    background: rgba(254, 197, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(254, 197, 0, 0.3);
    border-radius: 15px;
    padding: 0.75rem 1rem;
    min-width: 220px;
    max-width: 250px;
    animation: slideInRight 0.5s ease-out;
    z-index: 100;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.preview-label {
    font-size: 0.75rem;
    color: var(--muted-text);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.preview-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.preview-time {
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 600;
    line-height: 1.2;
}

/* Footer */
.footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0.5rem 0 1.5rem 0;
    border-top: 2px solid rgba(254, 197, 0, 0.3);
    margin-top: 0.5rem;
}

.greeting {
    font-size: 2rem;
    font-weight: 600;
    color: var(--light-text);
    margin-bottom: 0.5rem;
    animation: fadeIn 1s ease-out;
}

.quote {
    font-size: 1.5rem;
    font-style: italic;
    color: var(--muted-text);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.6;
    animation: fadeIn 1.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Wallpaper View (No Active Batch) */
.wallpaper-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
    animation: fadeIn 1s ease-out;
    position: relative;
}

.wallpaper-date-time {
    position: fixed;
    top: 4rem;
    left: 2rem;
    text-align: left;
    z-index: 100;
    animation: fadeIn 1s ease-out 0.3s both;
}

.wallpaper-date {
    font-size: 1.2rem;
    color: var(--muted-text);
    font-weight: 600;
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
}

.wallpaper-time {
    font-size: 1.5rem;
    color: var(--light-text);
    font-weight: 700;
    font-family: 'Montserrat', monospace;
    letter-spacing: 2px;
}

.wallpaper-next-batch-indicator {
    position: fixed;
    top: 2.5rem;
    right: 2rem;
    text-align: right;
    z-index: 100;
    animation: fadeIn 1s ease-out 0.3s both;
}

.wallpaper-next-batch-text {
    font-size: 1.1rem;
    color: var(--light-text);
    font-weight: 600;
    letter-spacing: 1px;
}

.wallpaper-next-batch-text .label {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.wallpaper-logo-container {
    animation: logoFloat 4s ease-in-out infinite;
}

.wallpaper-logo {
    height: 200px;
    width: auto;
    filter: drop-shadow(0 10px 40px rgba(254, 197, 0, 0.6)) 
            drop-shadow(0 0 60px rgba(254, 197, 0, 0.5))
            drop-shadow(0 0 100px rgba(255, 149, 0, 0.4));
    opacity: 0.9;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 10px 40px rgba(254, 197, 0, 0.6)) 
                drop-shadow(0 0 60px rgba(254, 197, 0, 0.5))
                drop-shadow(0 0 100px rgba(255, 149, 0, 0.4));
    }
    50% {
        transform: translateY(-20px) scale(1.05);
        filter: drop-shadow(0 15px 60px rgba(254, 197, 0, 0.8)) 
                drop-shadow(0 0 80px rgba(254, 197, 0, 0.7))
                drop-shadow(0 0 120px rgba(255, 149, 0, 0.6));
    }
}

/* Hide batch display when showing wallpaper */
.main-content.show-wallpaper .batch-display {
    display: none;
}

.main-content.show-wallpaper .wallpaper-view {
    display: flex;
}

/* Hide header and footer when showing wallpaper */
.container.show-wallpaper .header {
    display: none;
}

.container.show-wallpaper .footer {
    display: none;
}

/* No Active Batch State */
.no-batch {
    text-align: center;
    padding: 4rem;
}

.no-batch-message {
    font-size: 3rem;
    color: var(--muted-text);
    font-weight: 600;
}

/* Responsive Design for TV Screens */
@media (min-width: 1920px) {
    .batch-name {
        font-size: 5.5rem;
    }
    
    .timer {
        font-size: 10rem;
    }
    
    .logo {
        height: 120px;
    }
    
    .wallpaper-logo {
        height: 250px;
    }
    
    .date, .wallpaper-date {
        font-size: 1.4rem;
    }
    
    .time, .wallpaper-time {
        font-size: 1.8rem;
    }
    
    .next-batch-text, .wallpaper-next-batch-text {
        font-size: 1.3rem;
    }
}

@media (min-width: 3840px) {
    .batch-name {
        font-size: 7rem;
    }
    
    .timer {
        font-size: 12rem;
    }
    
    .logo {
        height: 150px;
    }
    
    .wallpaper-logo {
        height: 350px;
    }
    
    .date, .wallpaper-date {
        font-size: 1.8rem;
    }
    
    .time, .wallpaper-time {
        font-size: 2.2rem;
    }
    
    .next-batch-text, .wallpaper-next-batch-text {
        font-size: 1.6rem;
    }
    
    .quote {
        font-size: 2rem;
    }
}

/* Background Animation */
.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(254, 197, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(254, 197, 0, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 149, 0, 0.1) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

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

/* Timeline Decoration (Video Editing Theme) */
.container::after {
    content: '';
    position: absolute;
    bottom: 100px;
    left: 5%;
    right: 5%;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%,
        var(--primary-color) 20%,
        var(--secondary-color) 40%,
        var(--accent-color) 60%,
        var(--secondary-color) 80%,
        transparent 100%
    );
    opacity: 0.3;
    z-index: 1;
    animation: timelineFlow 3s linear infinite;
}

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

