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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    text-align: center;
}

h1 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #e0e0e0;
}

.waveform-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 30px;
}

#waveform {
    width: 100%;
    height: 150px;
    display: block;
    border-radius: 8px;
}

.note-display {
    margin-bottom: 30px;
}

.note {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    color: #4ade80;
    text-shadow: 0 0 30px rgba(74, 222, 128, 0.5);
    transition: color 0.2s ease;
}

.note.flat {
    color: #f87171;
    text-shadow: 0 0 30px rgba(248, 113, 113, 0.5);
}

.note.sharp {
    color: #fbbf24;
    text-shadow: 0 0 30px rgba(251, 191, 36, 0.5);
}

.frequency {
    font-size: 1.5rem;
    color: #9ca3af;
    margin-top: 10px;
}

.tuning-container {
    margin-bottom: 30px;
}

.tuning-meter {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 10px;
    padding: 0 10px;
}

.meter-bar {
    position: relative;
    height: 24px;
    background: linear-gradient(90deg,
        #f87171 0%,
        #fbbf24 25%,
        #4ade80 45%,
        #4ade80 55%,
        #fbbf24 75%,
        #f87171 100%
    );
    border-radius: 12px;
    overflow: hidden;
}

.meter-center {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #fff;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.meter-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.9), 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: left 0.1s ease-out;
    z-index: 10;
}

.cents {
    font-size: 1rem;
    color: #6b7280;
    margin-top: 15px;
}

.start-button {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 16px 48px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.4);
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.5);
}

.start-button:active {
    transform: translateY(0);
}

.start-button.active {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    box-shadow: 0 4px 15px rgba(248, 113, 113, 0.4);
}

.start-button.active:hover {
    box-shadow: 0 6px 20px rgba(248, 113, 113, 0.5);
}

.tuning-reference {
    margin-top: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
}

.tuning-reference h2 {
    font-size: 1rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #9ca3af;
    margin-bottom: 20px;
}

.instrument {
    margin-bottom: 20px;
}

.instrument:last-child {
    margin-bottom: 0;
}

.instrument h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 10px;
    text-align: left;
}

.strings {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.string {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 60px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.string:hover {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.3);
}

.string.playing {
    background: rgba(74, 222, 128, 0.25);
    border-color: #4ade80;
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
}

.string-name {
    font-size: 1rem;
    font-weight: 600;
    color: #4ade80;
}

.string-freq {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 2px;
}

.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
}

.footer a:hover {
    color: #9ca3af;
}

.footer a:first-child {
    background: #e0e0e0;
    color: #1a1a2e;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 12px;
}

.footer a:first-child:hover {
    background: #fff;
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .note {
        font-size: 4rem;
    }

    .frequency {
        font-size: 1.25rem;
    }

    #waveform {
        height: 120px;
    }

    .string {
        min-width: 50px;
        padding: 6px 10px;
    }

    .string-name {
        font-size: 0.875rem;
    }

    .string-freq {
        font-size: 0.625rem;
    }
}
