* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    min-height: 100vh;
    background:
        linear-gradient(135deg, #020617, #020617 40%, #0f172a),
        radial-gradient(circle at top, #1e293b, #020617);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #e5e7eb;
}

.container {
    text-align: center;
    padding: 30px;
}

h1 {
    font-size: 2.1rem;
    letter-spacing: 6px;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.compass {
    position: relative;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: linear-gradient(145deg, #020617, #0f172a);
    box-shadow:
        0 50px 90px rgba(0, 0, 0, .85),
        inset 0 0 45px rgba(56, 189, 248, .25);
    overflow: hidden;
}

.compass::before {
    content: "";
    position: absolute;
    inset: -30%;
    background: linear-gradient(120deg,
            transparent 30%,
            rgba(56, 189, 248, .18),
            transparent 70%);
    animation: shine 10s linear infinite;
}

@keyframes shine {
    to {
        transform: rotate(360deg);
    }
}

.ring {
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background:
        linear-gradient(145deg, #020617, #020617),
        radial-gradient(circle at top, #1e293b, #020617);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: inset 0 0 30px rgba(56, 189, 248, .35);
}

.needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 140px;
    background: linear-gradient(to top, #ef4444, #fb7185, #fecaca);
    border-radius: 8px;
    transform-origin: bottom;
    transform: translate(-50%, -100%) rotate(0deg);
    transition: transform .25s ease-out;
    box-shadow: 0 0 25px rgba(239, 68, 68, .9);
}

.center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    background: radial-gradient(circle at top, #7dd3fc, #0ea5e9);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
        0 0 18px #38bdf8,
        inset 0 0 6px rgba(255, 255, 255, .7);
    z-index: 5;
}

.dir {
    position: absolute;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 1px;
    color: #38bdf8;
    text-shadow: 0 0 12px rgba(56, 189, 248, .9);
}

.n {
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
}

.s {
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
}

.e {
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.w {
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.degree {
    margin-top: 22px;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #e5e7eb, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hint {
    margin-top: 10px;
    font-size: .85rem;
    opacity: .7;
}

@media(max-width:480px) {
    .compass {
        width: 260px;
        height: 260px;
    }

    .needle {
        height: 100px;
    }
}