:root {
    --primary-color: #00d2ff;
    --bg-color: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #ffffff;
    --clock-face-bg: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    transition: background-color 0.5s ease;
}

/* Background Effects */
.background-effects {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    transition: background-color 0.5s ease;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background-color: var(--primary-color);
    top: -50px;
    left: -50px;
    animation: float 10s infinite ease-in-out;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background-color: var(--primary-color); /* Will change with theme */
    bottom: -100px;
    right: -100px;
    animation: float 12s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

/* App Container */
.app-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
}

/* Header & Controls */
header {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.theme-control {
    position: relative;
    cursor: pointer;
}

#colorPicker {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.theme-control label {
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s;
}

.theme-control label:hover {
    color: var(--primary-color);
}

/* Clock Display Area */
.clock-display-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 2rem;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s, color 0.3s;
    padding: 10px;
}

.nav-btn:hover {
    opacity: 1;
    color: var(--primary-color);
}

.clock-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.clock {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.clock.active {
    display: flex;
    opacity: 1;
}

/* Analog Clock Styles */
.analog-clock {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--clock-face-bg);
    border: 4px solid var(--primary-color);
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.2), inset 0 0 20px rgba(0,0,0,0.5);
}

.clock-face {
    position: relative;
    width: 100%;
    height: 100%;
}

.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom;
    border-radius: 4px;
    z-index: 10;
}

.hour-hand {
    width: 6px;
    height: 60px;
    background: #fff;
    transform: translateX(-50%) rotate(0deg);
}

.minute-hand {
    width: 4px;
    height: 90px;
    background: #ccc;
    transform: translateX(-50%) rotate(0deg);
}

.second-hand {
    width: 2px;
    height: 100px;
    background: var(--primary-color);
    transform: translateX(-50%) rotate(0deg);
    z-index: 11;
}

.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 12;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.marker {
    position: absolute;
    font-weight: 700;
    font-size: 1.2rem;
    color: rgba(255,255,255,0.7);
}

.twelve { top: 10px; left: 50%; transform: translateX(-50%); }
.six { bottom: 10px; left: 50%; transform: translateX(-50%); }
.three { right: 15px; top: 50%; transform: translateY(-50%); }
.nine { left: 15px; top: 50%; transform: translateY(-50%); }

/* Digital Clock Styles */
.digital-clock {
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.time-text {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(0,210,255,0.5);
    font-variant-numeric: tabular-nums;
}

/* Date Container */
.date-container {
    text-align: center;
    margin-bottom: 1.5rem;
    height: 1.5rem; /* Reserve space */
    transition: opacity 0.3s ease;
}

.date-container.hidden {
    opacity: 0;
    pointer-events: none;
}

#dateText {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    letter-spacing: 1px;
}

/* Botom Controls */
.controls {
    display: flex;
    justify-content: center;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
}

/* Responsiveness */
@media (max-width: 480px) {
    .app-container {
        padding: 2rem;
        width: 100%;
        height: 100%;
        border-radius: 0;
        justify-content: center;
    }
    
    .clock-wrapper {
        width: 280px;
        height: 280px;
    }
    
    .time-text {
        font-size: 4rem;
    }
}
