:root {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --accent-color: #00ff88;
    --compass-bg: #2a2a2a;
    --compass-border: #3a3a3a;
    --needle-color: #ff3b30;
    --cardinal-color: #ffffff;
    --tick-color: #666;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overscroll-behavior: none;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-weight: 300;
    letter-spacing: 1px;
    font-size: 1.5rem;
}

.compass-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.compass-housing {
    width: 300px;
    height: 300px;
    background: var(--compass-bg);
    border-radius: 50%;
    border: 8px solid var(--compass-border);
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 5px 15px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
}

.compass-rose {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 50%;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.cardinal {
    position: absolute;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--cardinal-color);
}

.n { top: 15px; left: 50%; transform: translateX(-50%); color: var(--needle-color); }
.e { right: 15px; top: 50%; transform: translateY(-50%); }
.s { bottom: 15px; left: 50%; transform: translateX(-50%); }
.w { left: 15px; top: 50%; transform: translateY(-50%); }

.needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 140px;
    background: linear-gradient(to bottom, var(--needle-color) 50%, white 50%);
    transform: translate(-50%, -50%);
    border-radius: 2px;
    z-index: 2;
}

.needle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.indicator {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid var(--accent-color);
    z-index: 10;
}

.heading-display {
    font-size: 2.5rem;
    font-weight: 200;
    font-variant-numeric: tabular-nums;
}

.controls {
    text-align: center;
    margin-bottom: 2rem;
}

.btn-primary {
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.btn-primary:active {
    transform: scale(0.95);
}

.hidden {
    display: none !important;
}

.location-info {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.info-item .label {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.25rem;
}

.info-item .value {
    font-family: monospace;
    font-size: 0.9rem;
}

.calibration-guide {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    color: #ffb74d;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 2rem;
}

.seo-content {
    margin-top: auto;
    font-size: 0.9rem;
    color: #888;
}

.seo-content h2 {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.seo-content ul {
    list-style-position: inside;
    margin-top: 0.5rem;
}

footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #666;
}

/* Ticks generation would ideally be done in JS, but simple ones here */
.ticks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}
