/* --- 1. Root Variables & Theme Definitions --- */
:root {
    /* Base Colors (Dark Mode Defaults) */
    --gold: #b08d57;
    --highlight: #ff4d4d;
    --bg-dark: #0e0e0e;
    --bg-light: #f5f4f2;
    --glass: rgba(255, 255, 255, 0.08);
    --text: #eae7e2;
    --secondary-text: rgba(234, 231, 226, 0.6);
    --clock-size: clamp(300px, 80vw, 500px);
    --border-light: rgba(176, 141, 87, 0.3);

    /* Light Mode Constants */
    --bg-light-mode: #ffffff;
    --text-light-mode: #2b2b2b;
    --glass-light: rgba(0, 0, 0, 0.05);
}

/* --- 2. Theme Switching Logic --- */

/* Light Mode Setup */
body.light-mode {
    /* FIXED: Combined path into one line */
    background-image: url('./assets/light mode.jpg');
    background-color: #ffffff;
    
    /* Variables for Light Mode */
    --gold: #8c734b;
    --highlight: #d64545;
    --bg-dark: var(--bg-light-mode); /* Changes the background to white */
    --glass: var(--glass-light);
    --text: var(--text-light-mode);  /* Changes the numbers/text to dark */
    --secondary-text: rgba(43, 43, 43, 0.6);
    --border-light: rgba(140, 115, 75, 0.2);
}

/* Dark Mode Setup */
body.dark-mode {
    background-image: url('./assets/dark.jpg');
    background-color: #000000;
    
    /* Variables for Dark Mode */
    --bg-dark: #0e0e0e;
    --text: #eae7e2;
    --glass: rgba(255, 255, 255, 0.08);
}

/* --- 3. Global Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Uses the variables defined in themes above */
    background: var(--bg-dark); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text);
    
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.4s ease, color 0.4s ease, background-image 0.5s ease;
    overflow-x: hidden;
}

/* --- 4. Layout --- */
.app-container {
    text-align: center;
    width: 100%;
    padding: 20px;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--gold);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--secondary-text);
    margin-top: 0.5rem;
}

/* --- 5. Analog Clock --- */
.clock-wrapper {
    width: var(--clock-size);
    height: var(--clock-size);
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 50%;
    border: 2px solid var(--border-light);
    position: relative;
    margin: 2rem auto;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.clock-face {
    position: relative;
    width: 90%;
    height: 90%;
}

/* Numbers inside the clock */
.number {
    position: absolute;
    inset: 15px;
    text-align: center;
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: 600;
    color: var(--text); /* Changes based on theme */
    transform: rotate(var(--rotation));
}

.number span {
    display: inline-block;
    transform: rotate(calc(var(--rotation) * -1));
}

/* Clock Hands */
.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    border-radius: 10px;
}

.hour { width: 8px; height: 28%; background: var(--gold); z-index: 3; }
.minute { width: 5px; height: 38%; background: var(--gold); opacity: 0.8; z-index: 2; }
.second { width: 2px; height: 43%; background: var(--highlight); z-index: 4; }

.center-pin {
    width: 12px;
    height: 12px;
    background: var(--gold);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* --- 6. Digital Clock --- */
.digital-wrapper {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    display: inline-block;
}

.time-text {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
}

.date-text {
    font-size: 1.1rem;
    color: var(--text);
    opacity: 0.7;
}

/* --- 7. Controls & Buttons --- */
.app-controls {
    margin-top: 2.5rem;
    display: flex;
    gap: 15px;
    justify-content: center;
}

button {
    padding: 0.7rem 1.8rem;
    border: 1.5px solid var(--gold);
    background: transparent;
    color: var(--gold);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: var(--gold);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(176, 141, 87, 0.3);
}

.is-hidden { display: none !important; }

/* --- 8. Responsive Fixes --- */
@media (max-width: 480px) {
    .logo { font-size: 2rem; }
    .clock-wrapper { width: 280px; height: 280px; }
    .app-controls { flex-direction: column; align-items: center; }
}
/* Location & Weather Header */
.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: var(--glass);
    padding: 10px 25px;
    border-radius: 50px;
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.location-name {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
}

.weather-info {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: var(--text);
    border-left: 1px solid var(--secondary-text);
    padding-left: 15px;
}
