/* Elegant Watch Preloader */

/* Preloader Canvas */
.canvas {
    background: #0d3b27;
    /* Deep elegant dark green background */
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s ease;
    margin: 0;
    padding: 0;
}

/* Prevent body scroll when preloader is active */
body.preloader-active {
    overflow: hidden;
}

.canvas.fade-out {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.05);
    /* Slight zoom out effect as it fades */
}

/* Watch Container */
.watch-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Watch Face */
.watch-face {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    /* Silver rim */
    box-shadow:
        0 0 15px rgba(255, 255, 255, 0.1),
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        inset 0 0 5px rgba(255, 255, 255, 0.2);
    background: radial-gradient(circle at center, #155536 0%, #0d3b27 100%);
    /* Dial markers */
    background-image:
        linear-gradient(to bottom, #94a3b8 5px, transparent 5px, transparent 111px, #94a3b8 115px),
        linear-gradient(to right, #94a3b8 5px, transparent 5px, transparent 111px, #94a3b8 115px);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 2px 100%, 100% 2px;
}

/* Subtle inner dial for added depth */
.watch-face::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Common Hand styles */
.watch-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    border-radius: 4px;
    /* Soft shadow for depth */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Hour Hand (Slowest) */
.hour-hand {
    width: 4px;
    height: 35px;
    background: #cbd5e1;
    margin-left: -2px;
    animation: watch-spin 12s linear infinite;
    z-index: 2;
}

/* Minute Hand */
.minute-hand {
    width: 3px;
    height: 48px;
    background: #f8fafc;
    margin-left: -1.5px;
    animation: watch-spin 2s linear infinite;
    z-index: 3;
}

/* Second Hand (Fastest with sweeping motion) */
.second-hand {
    width: 1.5px;
    height: 55px;
    background: #eab308;
    /* Gold accent */
    margin-left: -0.75px;
    animation: watch-spin 1s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
    z-index: 4;
}

/* Center pin holding the hands */
.watch-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #fbbf24;
    border: 2px solid #0d3b27;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Brand Text Below Watch */
.watch-brand-text {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 6px;
    color: #f8fafc;
    text-transform: uppercase;
    text-align: center;
    opacity: 0;
    animation: text-fade-in 1s ease 0.5s forwards;
}

/* Animations */
@keyframes watch-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes text-fade-in {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 0.9;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .watch-face {
        width: 100px;
        height: 100px;
        background-size: 2px 100%, 100% 2px;
    }

    .hour-hand {
        height: 28px;
    }

    .minute-hand {
        height: 40px;
    }

    .second-hand {
        height: 45px;
    }

    .watch-center {
        width: 8px;
        height: 8px;
    }

    .watch-brand-text {
        font-size: 0.9rem;
        letter-spacing: 4px;
    }
}