* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    background: radial-gradient(circle at 30% 10%, #0a0f2a, #03050b);
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', 'Poppins', 'Inter', system-ui, -apple-system, 'Roboto', sans-serif;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(2px 2px at 20px 30px, rgba(255,255,240,0.15), transparent),
                        radial-gradient(1px 1px at 80px 240px, rgba(255,215,0,0.2), transparent);
    background-size: 60px 60px, 100px 100px;
    pointer-events: none;
    animation: slowDrift 40s linear infinite;
}

@keyframes slowDrift {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 120px 80px, 200px 150px; }
}

#clockContainer {
    position: relative;
    margin: auto;
    height: 70vh;
    width: 70vh;
    max-width: 520px;
    max-height: 520px;
    background: radial-gradient(ellipse at 30% 35%, #f5efdf, #e8dec8);
    border-radius: 50%;
    box-shadow: 0 30px 45px rgba(0, 0, 0, 0.5), 
                0 0 0 10px rgba(210, 180, 140, 0.2),
                inset 0 0 25px rgba(255, 235, 170, 0.3),
                inset 0 8px 12px rgba(255,255,210,0.6);
    transition: all 0.2s ease;
    cursor: pointer;
    overflow: visible;
}

#clockContainer {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"><defs><radialGradient id="gradFace" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="%23fdf8ec"/><stop offset="70%" stop-color="%23ece4d7"/><stop offset="100%" stop-color="%23d6cdb5"/></radialGradient><pattern id="linen" patternUnits="userSpaceOnUse" width="6" height="6"><path d="M0 0L6 6M6 0L0 6" stroke="%23b8aa8b" stroke-width="0.4" opacity="0.2"/></pattern></defs><circle cx="200" cy="200" r="192" fill="url(%23gradFace)" stroke="%23cbbd9a" stroke-width="3"/><circle cx="200" cy="200" r="185" fill="url(%23linen)" stroke="none"/><circle cx="200" cy="200" r="188" fill="none" stroke="%23e9dfb0" stroke-width="1.2" stroke-dasharray="3 3"/></svg>');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #f7efda;
}

.center-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6%;
    height: 6%;
    background: radial-gradient(circle, #d4af6a, #b88638);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    box-shadow: 0 0 0 4px rgba(255,245,190,0.6), 0 2px 6px rgba(0,0,0,0.3);
    pointer-events: none;
}

#hour {
    position: absolute;
    width: 2.2%;
    height: 24%;
    top: 26%;
    left: 48.9%;
    background: linear-gradient(135deg, #1e1a14, #2c241b);
    border-radius: 30% 30% 12px 12px;
    transform-origin: bottom;
    z-index: 15;
    box-shadow: 0 6px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,245,170,0.4);
    border-bottom: 2px solid #c9aa5f;
}

#hour::before {
    content: '';
    position: absolute;
    top: -5%;
    left: 20%;
    width: 60%;
    height: 10%;
    background: radial-gradient(circle, #f3d382, #dba542);
    border-radius: 50%;
    filter: blur(0.6px);
}

#minute {
    position: absolute;
    width: 1.8%;
    height: 32%;
    top: 18%;
    left: 49.05%;
    background: linear-gradient(130deg, #2e2a24, #3d352b);
    border-radius: 20% 20% 8px 8px;
    transform-origin: bottom;
    z-index: 16;
    box-shadow: 0 4px 7px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,250,200,0.3);
    border-bottom: 1.5px solid #e4bc7c;
}

#minute::before {
    content: '';
    position: absolute;
    top: -4%;
    left: 22%;
    width: 56%;
    height: 8%;
    background: radial-gradient(circle, #f3d382, #dba542);
    border-radius: 50%;
    filter: blur(0.6px);
}

#second {
    position: absolute;
    width: 1.2%;
    height: 42%;
    top: 8%;
    left: 49.4%;
    background: linear-gradient(145deg, #c22d2d, #a51f1f);
    transform-origin: bottom;
    z-index: 17;
    box-shadow: 0 0 6px rgba(220, 40, 40, 0.6), inset 0 1px 2px rgba(255,200,100,0.5);
    border-radius: 40% 40% 20% 20%;
}

#second::before {
    content: '';
    position: absolute;
    top: -8%;
    left: 25%;
    width: 50%;
    height: 12%;
    background: radial-gradient(circle, #ffcf8a, #d46b1a);
    border-radius: 50%;
    box-shadow: 0 0 4px #ffb347;
}

.roman-numeral {
    position: absolute;
    font-family: 'Times New Roman', 'Georgia', serif;
    font-weight: 700;
    font-size: clamp(16px, 4.5vh, 32px);
    color: #3d2b1a;
    text-shadow: 0 1px 2px rgba(255,250,190,0.5);
    z-index: 8;
    pointer-events: none;
    text-align: center;
    transform: translate(-50%, -50%);
}

.num-XII { 
    top: 8%; 
    left: 50%; 
}

.num-I { 
    top: 17.5%; 
    left: 73%; 
}

.num-II { 
    top: 33%; 
    left: 88%; 
}

.num-III { 
    top: 50%; 
    left: 93%; 
}

.num-IV { 
    top: 67%; 
    left: 88%; 
}

.num-V { 
    top: 82.5%; 
    left: 73%; 
}

.num-VI { 
    top: 92%; 
    left: 50%; 
}

.num-VII { 
    top: 82.5%; 
    left: 27%; 
}

.num-VIII { 
    top: 67%; 
    left: 12%; 
}

.num-IX { 
    top: 50%; 
    left: 7%; 
}

.num-X { 
    top: 33%; 
    left: 12%; 
}

.num-XI { 
    top: 17.5%; 
    left: 27%; 
}

.tick-layer {
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, 
        transparent 0deg 3deg, rgba(80,60,40,0.35) 3deg 4.5deg, transparent 4.5deg 6deg,
        transparent 6deg 9deg, rgba(80,60,40,0.3) 9deg 10.5deg, transparent 10.5deg 12deg,
        transparent 12deg 15deg, rgba(80,60,40,0.3) 15deg 16.5deg, transparent 16.5deg 18deg,
        transparent 18deg 21deg, rgba(80,60,40,0.3) 21deg 22.5deg, transparent 22.5deg 24deg,
        transparent 24deg 27deg, rgba(80,60,40,0.3) 27deg 28.5deg, transparent 28.5deg 30deg);
    mask: radial-gradient(circle, transparent 70%, black 85%);
    -webkit-mask: radial-gradient(circle, transparent 70%, black 85%);
    pointer-events: none;
    z-index: 4;
}

.glass-reflection {
    position: absolute;
    top: 5%;
    left: 15%;
    width: 35%;
    height: 22%;
    background: radial-gradient(ellipse, rgba(255,255,240,0.35), transparent 70%);
    border-radius: 50%;
    filter: blur(8px);
    pointer-events: none;
    z-index: 7;
}

.outer-ring {
    position: absolute;
    top: -2%;
    left: -2%;
    width: 104%;
    height: 104%;
    border-radius: 50%;
    border: 2px solid rgba(230, 205, 140, 0.5);
    box-shadow: 0 0 12px rgba(255, 215, 120, 0.3);
    pointer-events: none;
    z-index: 1;
}

@media only screen and (max-width: 768px) {
    #clockContainer {
        height: 55vh;
        width: 55vh;
    }
    .roman-numeral {
        font-size: clamp(12px, 3.8vh, 22px);
    }
    .num-I { top: 16%; left: 72%; }
    .num-II { top: 32%; left: 87%; }
    .num-III { left: 92%; }
    .num-IV { top: 68%; left: 87%; }
    .num-V { top: 83%; left: 72%; }
    .num-VI { top: 91%; }
    .num-VII { top: 83%; left: 28%; }
    .num-VIII { top: 68%; left: 13%; }
    .num-IX { left: 8%; }
    .num-X { top: 32%; left: 13%; }
    .num-XI { top: 16%; left: 28%; }
}

@media only screen and (max-width: 480px) {
    #clockContainer {
        height: 45vh;
        width: 45vh;
    }
    .roman-numeral {
        font-size: 11px;
    }
    #hour { width: 2.5%; left: 48.7%; }
    #minute { width: 2%; left: 48.9%; }
    #second { width: 1.3%; left: 49.3%; }
    .num-I { top: 15%; left: 71%; }
    .num-II { top: 31%; left: 86%; }
    .num-IV { top: 69%; left: 86%; }
    .num-V { top: 84%; left: 71%; }
    .num-VII { top: 84%; left: 29%; }
    .num-VIII { top: 69%; left: 14%; }
    .num-X { top: 31%; left: 14%; }
    .num-XI { top: 15%; left: 29%; }
}

.digital-hint {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    padding: 8px 18px;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: #e9e2c7;
    font-family: monospace;
    border: 1px solid rgba(220,190,100,0.5);
    white-space: nowrap;
    z-index: 25;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}


.hour-dot {
    position: absolute;
    width: 3%;
    height: 3%;
    background: radial-gradient(circle, #c9aa5f, #8b691b);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 0 3px rgba(0,0,0,0.2);
}

.dot-12 { top: 10%; left: 50%; }
.dot-1 { top: 20%; left: 71%; }
.dot-2 { top: 36%; left: 86%; }
.dot-3 { top: 50%; left: 91.5%; }
.dot-4 { top: 64%; left: 86%; }
.dot-5 { top: 80%; left: 71%; }
.dot-6 { top: 90%; left: 50%; }
.dot-7 { top: 80%; left: 29%; }
.dot-8 { top: 64%; left: 14%; }
.dot-9 { top: 50%; left: 8.5%; }
.dot-10 { top: 36%; left: 14%; }
.dot-11 { top: 20%; left: 29%; }
