:root {
    --bg-dark: #07090e;
    --text-main: #f0f2f8;
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.06);
    --accent: #6b7aff;
    --accent-glow: rgba(107, 122, 255, 0.25);
    
    --font-main: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background grid overlay */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2;
    pointer-events: none;
}

/* Background Orbs */
.background-orbs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.35;
    animation: float 25s infinite ease-in-out alternate;
}

.orb-1 {
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, #1a235c 0%, transparent 70%);
    top: -15%;
    left: -10%;
}

.orb-2 {
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, #092e42 0%, transparent 70%);
    bottom: -15%;
    right: -10%;
    animation-delay: -8s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(8%, 15%) scale(1.15); }
}

/* Clock Layout */
.clock-container {
    z-index: 1;
}

#clock {
    font-size: 7.5rem;
    font-weight: 200;
    letter-spacing: -2px;
    padding: 3rem 5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 
                0 0 40px rgba(107, 122, 255, 0.1);
    color: #ffffff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    font-variant-numeric: tabular-nums; /* Prevents layout shifting as digits change */
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

#clock:hover {
    border-color: rgba(107, 122, 255, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 
                0 0 50px rgba(107, 122, 255, 0.25);
}

/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive Scaling for Large Fonts */
@media (max-width: 768px) {
    #clock {
        font-size: 4.5rem;
        padding: 2rem 3rem;
        border-radius: 24px;
    }
}

@media (max-width: 480px) {
    #clock {
        font-size: 3rem;
        padding: 1.5rem 2rem;
        border-radius: 16px;
    }
}
