:root {
    --primary: #FFC502;
    --bg-dark: #1E2227;
    --card-bg: #2a2f36;
    --text-white: #ffffff;
    --text-muted: #b0b3b8;
    --gray-circle: #3d444d;
    --gray-line: #5a626d;
    --error: #ff4d4d;
    --success: #4CAF50;
    --kb-black: #121417;
}

body {
    background-color: var(--bg-dark); 
    color: var(--text-white);
    font-family: 'Segoe UI', sans-serif; 
    margin: 0; 
    padding: 20px 10px;
    display: flex; 
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.header { 
    width: 100%; 
    max-width: 420px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
}
.back-btn { 
    color: var(--primary); 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 14px; 
    cursor: pointer;
}

.chord-card {
    background-color: var(--card-bg); 
    border-radius: 20px; 
    padding: 10px;
    width: 100%; 
    max-width: 420px;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    overflow: hidden;
    position: relative;
}

.help-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 28px;
    height: 28px;
    background-color: rgba(255, 197, 2, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    z-index: 20;
}

.help-btn:hover {
    background-color: var(--primary);
    color: #000;
}

.label { 
    font-size: 10px; 
    color: var(--primary); 
    font-weight: 800; 
    text-transform: uppercase; 
    margin-bottom: 10px; 
    display: block; 
    opacity: 0.8; 
}

.controls-row { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 20px; 
    margin-top: 45px;
    padding-right: 0px; 
}

.cycle-selector { 
    flex: 1; 
    background: var(--kb-black); 
    border: 1px solid #444; 
    color: white; 
    padding: 12px; 
    border-radius: 12px; 
    font-size: 14px; 
    outline: none; 
    font-weight: bold;
}

.play-pause-btn { 
    background: rgba(255, 197, 2, 0.1);
    border: 1px solid rgba(255, 197, 2, 0.3);
    border-radius: 12px; 
    width: 60px; 
    height: 45px; 
    cursor: pointer; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.cycle-container {
    position: relative; 
    width: 280px; 
    height: 280px; 
    margin: 10px auto;
    display: flex; 
    justify-content: center; 
    align-items: center;
}

.wheel { position: absolute; width: 100%; height: 100%; border-radius: 50%; }
.note-wrapper { position: absolute; left: 50%; top: 50%; margin-left: -22px; margin-top: -22px; width: 44px; height: 44px; }

.note-circle {
    width: 100%; height: 100%; background-color: var(--gray-circle);
    border: 1.5px solid var(--gray-line); border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-weight: bold; color: white; font-size: 15px; cursor: pointer;
    transition: all 0.2s;
}

.center-display {
    font-size: 105px; font-weight: 600; color: var(--primary);
    z-index: 10; pointer-events: none; position: absolute;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    width: 100%;
}

.center-display.correct { 
    color: var(--success); 
    text-shadow: 0 0 25px var(--success);
    transform: scale(1.1);
}

.center-display.wrong { color: var(--error); text-shadow: 0 0 15px var(--error); }

.tip-card {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 15px;
    width: 100%;
    max-width: 420px;
    margin-top: 15px;
    box-sizing: border-box;
    border: 1px dashed rgba(255, 197, 2, 0.2);
    text-align: justify;
}
.tip-title { color: var(--primary); font-size: 10px; font-weight: 900; letter-spacing: 1.5px; margin-bottom: 5px; display: block; }
.tip-text { color: var(--text-muted); font-size: 13px; line-height: 1.4; margin: 0; }

.modal-help {
    display: none; position: fixed; z-index: 9999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    align-items: center; justify-content: center;
    padding: 20px; box-sizing: border-box;
}
.modal-content {
    background-color: var(--card-bg); padding: 40px 25px; border-radius: 25px;
    border: 1px solid var(--primary); position: relative;
    width: 100%; max-width: 380px; animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.close-modal { position: absolute; top: 15px; right: 20px; color: var(--text-white); font-size: 30px; cursor: pointer; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(10px); }
}
.shake { animation: shake 0.3s; }