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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #111111;
    color: #fbf9e2;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Enhanced full-viewport spacey animated background */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: 
        radial-gradient(circle at 15% 25%, rgba(120, 190, 186, 0.12) 0%, transparent 35%),
        radial-gradient(circle at 85% 75%, rgba(32, 105, 175, 0.10) 0%, transparent 40%),
        radial-gradient(circle at 45% 85%, rgba(231, 178, 37, 0.08) 0%, transparent 30%),
        radial-gradient(circle at 75% 15%, rgba(211, 82, 51, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 25% 65%, rgba(120, 190, 186, 0.05) 0%, transparent 35%),
        radial-gradient(circle at 90% 40%, rgba(32, 105, 175, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 10% 80%, rgba(231, 178, 37, 0.03) 0%, transparent 40%);
    animation: cosmicDrift 200s ease-in-out infinite;
    z-index: -3;
}

/* Full-viewport geometric network pattern */
body::after {
    content: '';
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-image: 
        radial-gradient(1.5px 1.5px at 25px 35px, rgba(120, 190, 186, 0.15), transparent),
        radial-gradient(1px 1px at 75px 85px, rgba(231, 178, 37, 0.10), transparent),
        radial-gradient(1.2px 1.2px at 125px 45px, rgba(32, 105, 175, 0.08), transparent),
        radial-gradient(0.8px 0.8px at 175px 95px, rgba(211, 82, 51, 0.06), transparent),
        radial-gradient(1px 1px at 225px 25px, rgba(120, 190, 186, 0.07), transparent),
        radial-gradient(1.3px 1.3px at 50px 150px, rgba(32, 105, 175, 0.05), transparent),
        radial-gradient(0.9px 0.9px at 200px 180px, rgba(231, 178, 37, 0.04), transparent);
    background-repeat: repeat;
    background-size: 280px 140px;
    animation: geometricFlow 350s linear infinite;
    z-index: -2;
}

@keyframes cosmicDrift {
    0%, 100% { 
        transform: translateX(0) translateY(0) scale(1) rotate(0deg); 
        opacity: 0.9;
    }
    25% { 
        transform: translateX(-40px) translateY(-20px) scale(1.08) rotate(1.5deg); 
        opacity: 0.7;
    }
    50% { 
        transform: translateX(30px) translateY(35px) scale(0.92) rotate(-1deg); 
        opacity: 1.0;
    }
    75% { 
        transform: translateX(35px) translateY(-25px) scale(1.05) rotate(1.2deg); 
        opacity: 0.8;
    }
}

@keyframes geometricFlow {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-280px) translateY(-140px); }
}

.header {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
    font-weight: 300;
    letter-spacing: 1.5px;
}

.timezone {
    font-size: 13px;
    opacity: 0.6;
    margin-bottom: 10px;
    color: #78BEBA;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.temporal-code-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 8px 16px;
    background: rgba(120, 190, 186, 0.08);
    border: 1px solid rgba(120, 190, 186, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(20px);
}

.header-icon {
    width: 22px;
    height: 22px;
    opacity: 0.9;
    filter: drop-shadow(0 0 4px rgba(120, 190, 186, 0.3));
}

.temporal-code {
    font-size: 16px;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    color: #fbf9e2;
    text-shadow: 0 0 8px rgba(251, 249, 226, 0.2);
    letter-spacing: 1px;
}

.conventional-time {
    position: fixed;
    top: 25px;
    right: 25px;
    text-align: right;
    z-index: 100;
    padding: 8px 16px;
    background: rgba(32, 105, 175, 0.08);
    border: 1px solid rgba(32, 105, 175, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(20px);
}

.date-display {
    font-size: 14px;
    font-weight: 500;
    color: #2069af;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.time-display {
    font-size: 16px;
    font-weight: 600;
    color: #fbf9e2;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(32, 105, 175, 0.3);
}

.canvas-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#timeCanvas {
    border-radius: 50%;
    box-shadow: 
        0 0 60px rgba(120, 190, 186, 0.08),
        inset 0 0 40px rgba(251, 249, 226, 0.03),
        0 0 120px rgba(32, 105, 175, 0.04);
    filter: drop-shadow(0 0 20px rgba(120, 190, 186, 0.06));
}

.ring-labels-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.ring-label {
     position: absolute;
     font-size: 10px;
     font-weight: 500;
     color: rgba(251, 249, 226, 0.5);
     text-shadow: 
         0 0 4px rgba(0, 0, 0, 0.9),
         0 0 8px rgba(120, 190, 186, 0.2);
     font-family: 'Courier New', monospace;
     letter-spacing: 0.8px;
     transform: translate(-50%, -50%);
     transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
     user-select: none;
     text-align: center;
     white-space: nowrap;
}

.ring-label.milliseconds { font-size: 7px; opacity: 0.6; }
.ring-label.seconds { font-size: 8px; opacity: 0.6; }
.ring-label.minutes { font-size: 9px; opacity: 0.5; }
.ring-label.hours { 
    font-size: 10px; 
    opacity: 0.5; 
    font-weight: 500;
    color: rgba(251, 249, 226, 0.5);
    text-shadow: 
        0 0 4px rgba(0, 0, 0, 0.9),
        0 0 8px rgba(120, 190, 186, 0.2);
}
.ring-label.days { font-size: 10px; opacity: 0.5; }
.ring-label.dayOfWeek { font-size: 10px; opacity: 0.5; }
.ring-label.weeks { font-size: 11px; opacity: 0.4; }
.ring-label.months { font-size: 11px; opacity: 0.4; }
.ring-label.quarters { font-size: 12px; opacity: 0.4; }
.ring-label.halves { font-size: 12px; opacity: 0.3; }
.ring-label.year { font-size: 13px; opacity: 0.3; }

/* Day view adjustments - animated traditional clock layout */
.day-view .ring-label.milliseconds,
.day-view .ring-label.seconds {
    opacity: 0.5;
    font-weight: 500;
}

.day-view .ring-label.hours {
    font-size: 18px !important;
    opacity: 1.0 !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 
        0 0 6px rgba(0, 0, 0, 0.9),
        0 0 12px rgba(255, 255, 255, 0.4) !important;
}

.day-view .ring-label.minutes {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 
        0 0 4px rgba(0, 0, 0, 0.9),
        0 0 8px rgba(255, 255, 255, 0.3) !important;
}

.day-view .ring-label.days {
    opacity: 0.6;
    font-weight: 600;
}

.day-view .ring-label.dayOfWeek {
    opacity: 0.6;
    font-weight: 600;
}

.day-view .ring-label.weeks,
.day-view .ring-label.months,
.day-view .ring-label.quarters,
.day-view .ring-label.halves,
.day-view .ring-label.year {
    opacity: 0.1;
}

.controls {
    position: fixed;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 100;
}

.control-btn {
    background: rgba(17, 17, 17, 0.8);
    border: 1px solid rgba(120, 190, 186, 0.3);
    color: rgba(251, 249, 226, 0.8);
    padding: 12px 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    transition: all 0.4s ease;
    backdrop-filter: blur(25px);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(120, 190, 186, 0.1), transparent);
    transition: left 0.5s ease;
}

.control-btn:hover::before {
    left: 100%;
}

.control-btn:hover {
    background: rgba(120, 190, 186, 0.12);
    border-color: rgba(120, 190, 186, 0.5);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(120, 190, 186, 0.15),
        0 0 20px rgba(120, 190, 186, 0.1);
    color: #fbf9e2;
}

.control-btn.active {
    background: rgba(120, 190, 186, 0.15);
    border-color: rgba(120, 190, 186, 0.6);
    color: #fbf9e2;
    box-shadow: 
        0 4px 15px rgba(120, 190, 186, 0.2),
        inset 0 1px 0 rgba(120, 190, 186, 0.3);
    text-shadow: 0 0 8px rgba(120, 190, 186, 0.4);
}

.control-btn.active::before {
    background: linear-gradient(90deg, transparent, rgba(231, 178, 37, 0.1), transparent);
}

/* Responsive design */
@media (max-width: 768px) {
    .header {
        top: 20px;
    }
    
    .conventional-time {
        top: 20px;
        right: 20px;
        padding: 6px 12px;
    }
    
    .date-display {
        font-size: 12px;
    }
    
    .time-display {
        font-size: 14px;
    }
    
    .temporal-code {
        font-size: 14px;
    }
    
    .header-icon {
        width: 18px;
        height: 18px;
    }
    
    .temporal-code-container {
        gap: 10px;
        padding: 6px 12px;
    }
    
    .controls {
        bottom: 25px;
        gap: 15px;
    }
    
    .control-btn {
        padding: 10px 20px;
        font-size: 11px;
    }
    
    .ring-label {
        font-size: 8px;
    }
    
    .ring-label.milliseconds { font-size: 6px; }
    .ring-label.seconds { font-size: 7px; }
    .ring-label.minutes { font-size: 8px; }
    .ring-label.hours { font-size: 9px; }
    .ring-label.days { font-size: 9px; }
    .ring-label.weeks { font-size: 10px; }
    .ring-label.months { font-size: 10px; }
    .ring-label.quarters { font-size: 11px; }
    .ring-label.halves { font-size: 11px; }
    .ring-label.year { font-size: 12px; }
}

@media (max-width: 480px) {
    .conventional-time {
        top: 15px;
        right: 15px;
        padding: 4px 8px;
    }
    
    .date-display {
        font-size: 10px;
    }
    
    .time-display {
        font-size: 12px;
    }
    
    .temporal-code-container {
        gap: 8px;
        padding: 5px 10px;
    }
    
    .temporal-code {
        font-size: 12px;
    }
    
    .header-icon {
        width: 16px;
        height: 16px;
    }
    
    .control-btn {
        padding: 8px 16px;
        font-size: 10px;
    }
    
    .ring-label {
        font-size: 7px;
    }
    
    .ring-label.milliseconds { font-size: 5px; }
    .ring-label.seconds { font-size: 6px; }
    .ring-label.minutes { font-size: 7px; }
    .ring-label.hours { font-size: 8px; }
    .ring-label.days { font-size: 8px; }
    .ring-label.weeks { font-size: 9px; }
    .ring-label.months { font-size: 9px; }
    .ring-label.quarters { font-size: 10px; }
    .ring-label.halves { font-size: 10px; }
    .ring-label.year { font-size: 11px; }
}

