/* =====================================================
   DESIGN SYSTEM — VARIABLES
===================================================== */
:root {
    /* Brand */
    --color-primary: #6c63ff;
    --color-primary-dark: #554ee6;
    --color-secondary: #00c9a7;
    --color-accent: #ffb703;

    /* Neutrals */
    --color-bg: #f6f8fc;
    --color-surface: #ffffff;
    --color-text: #1f2933;
    --color-muted: #6b7280;
    --color-border: rgba(0, 0, 0, 0.08);

    /* Effects */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.18);

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-blur: blur(14px);

    /* Motion */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   RESET & BASE
===================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(
        circle at top left,
        #e8ebff,
        var(--color-bg)
    );
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Ubuntu, sans-serif;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* =====================================================
   BACKGROUND DECORATION
===================================================== */
body::before,
body::after {
    content: "";
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    z-index: -1;
}

body::before {
    top: -200px;
    left: -200px;
    background: var(--color-primary);
}

body::after {
    bottom: -200px;
    right: -200px;
    background: var(--color-secondary);
}

/* =====================================================
   WELCOME TITLE
===================================================== */
.welcome-container {
    margin-top: 100px;
    padding: 16px 28px;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-align: center;
    position: relative;

    color: var(--color-text);
    background: transparent;

    border-bottom: 4px solid var(--color-primary);
    cursor: pointer;

    animation: welcomeEnter 1.6s var(--ease-out) forwards;
}

/* Underline glow */
.welcome-container::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 8px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--color-primary),
        transparent
    );
    opacity: 0.7;
}

/* Welcome animation */
@keyframes welcomeEnter {
    0% {
        opacity: 0;
        transform: translateY(-150vh) scale(0.9);
    }
    70% {
        opacity: 1;
        transform: translateY(12px) scale(1.02);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

/* Hover */
.welcome-container:hover {
    color: var(--color-primary);
    transform: scale(1.07);
    transition: transform 0.35s var(--ease-in-out),
        color 0.35s var(--ease-in-out);
}

/* =====================================================
   CLOCK CARD
===================================================== */
.js-container {
    margin-top: 60px;
    padding: 36px 60px;

    font-family: "Courier New", monospace;
    font-size: 56px;
    letter-spacing: 6px;

    color: var(--color-text);

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

    border-radius: 24px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);

    position: relative;
    animation: clockAppear 2s var(--ease-out) forwards;
}

/* Clock animation */
@keyframes clockAppear {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.85);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Glow border */
.js-container::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    background: linear-gradient(
        135deg,
        var(--color-primary),
        var(--color-secondary)
    );
    opacity: 0.25;
    z-index: -1;
}

/* Hover */
.js-container:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    transition: all 0.35s var(--ease-in-out);
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 900px) {
    .welcome-container {
        font-size: 24px;
        margin-top: 70px;
    }

    .js-container {
        font-size: 44px;
        padding: 30px 46px;
    }
}

@media (max-width: 600px) {
    .welcome-container {
        font-size: 20px;
    }

    .js-container {
        font-size: 34px;
        letter-spacing: 3px;
        padding: 24px 32px;
    }
}

/* =====================================================
   GLOBAL TRANSITIONS
===================================================== */
.welcome-container,
.js-container {
    transition: all 0.3s var(--ease-in-out);
}
