/* =========================================
   GUIGAND.COM - LIVING DASHBOARD (FINAL)
   ========================================= */

/* 1. VARIABLES (LIGHTING ENGINE) */
:root {
    /* -- Atmosphere -- */
    --bg-deep: #050507;
    --bg-mesh-1: radial-gradient(at 0% 0%, rgba(29, 35, 50, 0.5) 0px, transparent 50%);
    --bg-mesh-2: radial-gradient(at 100% 0%, rgba(35, 30, 40, 0.4) 0px, transparent 50%);
    --bg-mesh-3: radial-gradient(at 100% 100%, rgba(15, 30, 40, 0.5) 0px, transparent 50%);

    /* -- Material: Deep Glass -- */
    --glass-surface: rgba(22, 22, 24, 0.6);
    --glass-blur: blur(20px);

    /* Rim Light & Shadow */
    --border-light: rgba(255, 255, 255, 0.12);
    --border-dark: rgba(0, 0, 0, 0.5);

    /* -- Metrics -- */
    --card-radius: 24px;
    --ease-elastic: cubic-bezier(0.2, 0.8, 0.2, 1);
    --max-width: 1000px;
}

/* 2. RESET & TEXTURE */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-deep);
    background-image: var(--bg-mesh-1), var(--bg-mesh-2), var(--bg-mesh-3);
    background-attachment: fixed;
    color: #ffffff;
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* NOISE TEXTURE */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
}

/* 3. LAYOUT STRUCTURE */
#app {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    position: relative;
    z-index: 10;
}

/* 4. THE LIVING WORLD CLOCK */
.world-clock-container {
    width: 100%;
    height: 80px;
    margin-bottom: 3.5rem;
    border-radius: 99px;
    /* Pill shape */

    position: relative;
    overflow: hidden;

    /* Base Glass */
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);

    /* Rim Light */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);

    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chromatic Animated Gradient Background */
.world-clock-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            rgba(0, 78, 146, 0.3),
            /* Paris Blue */
            rgba(255, 126, 95, 0.3),
            /* Perth Orange */
            rgba(0, 78, 146, 0.3));
    background-size: 200% 100%;
    animation: chromatic-shift 60s infinite linear;
    z-index: 0;
    opacity: 0.6;
}

@keyframes chromatic-shift {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

.clock-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4rem;
    width: 100%;
    justify-content: center;
}

.clock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.clock-time {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.clock-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.2rem;
    font-weight: 500;
}

.clock-date {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.1rem;
}

.clock-separator {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
}

/* 5. APP SECTIONS */
.app-section {
    margin-bottom: 3rem;
}

.ghost-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-left: 0.5rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-auto-flow: dense;
    gap: 1.25rem;
}

/* 6. CARD STYLES (AURORA PRESERVED) */
.card {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-radius: var(--card-radius);
    text-decoration: none;
    overflow: hidden;

    /* Ensure text is white (override default <a> blue) */
    color: var(--text-white);

    background: var(--glass-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);

    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-dark);
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;

    box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.02);
    transition: all 0.4s var(--ease-elastic);
    transform: translate3d(0, 0, 0);
}

/* Unified Light Source */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: radial-gradient(circle at 100% 0%, var(--brand-glow) 0%, transparent 60%);
    opacity: 0.15;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 0;
    pointer-events: none;
}

.card:hover::before {
    opacity: 0.4;
    transform: scale(1.2);
}

.card.hero {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
}

.card.hero::before {
    opacity: 0.35;
    background: radial-gradient(circle at 100% 0%, var(--brand-glow) 0%, transparent 70%);
}

.card.hero:hover::before {
    opacity: 0.5;
}

.card:hover {
    transform: translateY(-6px) scale(1.01);
    border-top-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 40px -10px var(--brand-glow), inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.card-content {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
    position: relative;
}

.card-icon {
    font-size: 2.2rem;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1);
}

.card-icon path,
.card-icon rect,
.card-icon circle,
.card-icon polyline,
.card-icon line {
    fill: white;
    stroke: white;
}

.card-label {
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* 7. MOBILE */
@media (max-width: 600px) {
    #app {
        padding: 1.5rem 1rem;
    }

    .world-clock-container {
        height: auto;
        padding: 1.5rem;
    }

    .clock-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .clock-separator {
        width: 100%;
        height: 1px;
    }

    .bento-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}