/* Core 9UY Utility Background */
:root {
  --bg: #0a0a0a;
  --fg: #d4d4d8;
  --accent: #10b981; /* green-500 base */
  --accent-secondary: #3b82f6;
  --danger: #ef4444;
  --border: #1f2937; /* gray-800 */
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    -webkit-font-smoothing: antialiased;
}

.scanline {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 50;
    opacity: 0.2;
}

/* Header Pattern */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 10;
}

.back-link, .feedback-link {
    color: #9ca3af;
    transition: color 0.2s;
    text-decoration: none;
    display: flex;
}
.back-link:hover, .feedback-link:hover {
    color: #ffffff;
}

.app-title {
    font-size: 1.125rem; /* text-lg */
    font-weight: 700;
    letter-spacing: 0.1em; /* tracking-widest */
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-indicator {
    font-size: 0.625rem; /* text-[10px] */
    color: rgba(16, 185, 129, 0.8); /* green-500/80 */
    text-transform: uppercase;
    letter-spacing: -0.05em; /* tracking-tighter */
}
.status-indicator.active {
    animation: blink 2s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Main Container */
.app-container {
    flex: 1;
    max-width: 36rem;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

/* Control Card */
.control-card {
    background-color: rgba(17, 24, 39, 0.5); /* bg-gray-900/50 */
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}
.control-card:hover {
    border-color: #374151; /* hover:border-gray-700 */
}

/* Base button */
.primary-btn {
    background: transparent;
    color: #ffffff;
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    margin-top: 1rem;
}
.primary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #4b5563;
}

/* Result Display */
.result-display {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.note-display {
    font-size: 8rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.05em;
    display: flex;
    align-items: baseline;
    justify-content: center;
}
.octave-text {
    font-size: 2rem;
    color: #6b7280;
    font-weight: 400;
    margin-left: 0.5rem;
}

/* Cent Gauge */
.cent-gauge-container {
    width: 100%;
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.cent-gauge {
    width: 100%;
    height: 4px;
    background: #1f2937;
    position: relative;
    border-radius: 2px;
}

.cent-marker {
    position: absolute;
    width: 2px;
    height: 16px;
    background: #4b5563;
    top: -6px;
}
.center-marker {
    left: 50%;
    transform: translateX(-50%);
    background: var(--fg);
    height: 24px;
    top: -10px;
}

.cent-pointer {
    position: absolute;
    width: 4px;
    height: 20px;
    background: var(--danger);
    top: -8px;
    left: 50%; /* standard middle */
    transform: translateX(-50%);
    transition: left 0.1s ease-out, background-color 0.2s;
    border-radius: 2px;
}
.cent-pointer.in-tune {
    background: var(--accent);
}

/* Stats Display */
.stats-display {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    justify-content: space-around;
    background-color: rgba(17, 24, 39, 0.5);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 0.5rem;
}

.stats-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stats-label {
    font-size: 0.75rem;
    color: #6b7280;
    letter-spacing: 0.05em;
}

.stats-value {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
}
