:root {
    --bg-color: #2a2a2a;
    --text-color: #e0e0e0;
    --accent-color: #00ff88;
    --compass-case: #3c3c3c;
    --compass-face: #1a1a1a;
    --needle-north: #ff3b30;
    --needle-south: #f0f0f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at center, #3a3a3a 0%, #1a1a1a 100%);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    text-align: center;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    height: 100%;
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.8;
}

.compass-container {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Physical Case Shadow */
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.7));
}

.compass-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--compass-face);
    /* Multi-layered shadows for 3D depth */
    box-shadow:
        0 0 0 12px var(--compass-case),
        /* Outer Rim */
        inset 0 10px 20px rgba(0, 0, 0, 0.8),
        /* Inner well depth */
        0 4px 10px rgba(255, 255, 255, 0.1);
    position: relative;
    transition: transform 0.1s linear;
}

/* Glass Cover Effect */
.compass-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
    z-index: 20;
    pointer-events: none;
    box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.05);
}

.compass-mark {
    position: absolute;
    font-weight: 700;
    font-size: 1.4rem;
    color: #444;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.compass-mark.N {
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--needle-north);
}

.compass-mark.E {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.compass-mark.S {
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
}

.compass-mark.W {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.compass-needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 180px;
    transform: translate(-50%, -50%);
    z-index: 10;
    /* 3D Tapered Needle */
    background: linear-gradient(to top,
            var(--needle-south) 0%,
            var(--needle-south) 49%,
            #000 50%,
            var(--needle-north) 51%,
            var(--needle-north) 100%);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.5));
}

/* Center Pin */
.compass-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle at 30% 30%, #555, #111);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.heading-text {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: #555;
    z-index: 0;
}

.status-message {
    font-size: 1.1rem;
    color: #666;
    margin-top: 40px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.status-message.active {
    color: var(--accent-color);
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.start-button {
    background: linear-gradient(to bottom, #444, #222);
    color: #ccc;
    border: 1px solid #111;
    padding: 18px 40px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow:
        0 4px 0 #000,
        0 10px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.1s;
    margin-top: 30px;
}

.start-button:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 #000,
        0 5px 10px rgba(0, 0, 0, 0.4);
}

.ios-warning {
    font-size: 0.8rem;
    color: #444;
    margin-top: 15px;
    max-width: 200px;
}

body.facing-north .compass-ring {
    box-shadow:
        0 0 0 12px var(--compass-case),
        inset 0 10px 30px rgba(0, 255, 136, 0.1),
        0 0 15px rgba(0, 255, 136, 0.1);
}