:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --primary: #00d2ff;
    --accent: #3a7bd5;
    --text: #e0e0e0;
    --active-beat: #ff0055;
    --inactive-beat: #333;
    --font-display: 'Orbitron', sans-serif;
    --font-ui: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text);
    font-family: var(--font-ui);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

header {
    text-align: center;
    opacity: 0.7;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 2px;
}

.metronome-card {
    background: var(--card-bg);
    border-radius: 30px;
    padding: 40px 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    position: relative;
    overflow: hidden;
}

/* Visualizer */
.beat-visualizer {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.beat-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--inactive-beat);
    transition: background-color 0.1s, transform 0.1s;
}

.beat-dot.active {
    background-color: var(--active-beat);
    transform: scale(1.3);
    box-shadow: 0 0 15px var(--active-beat);
}

.beat-dot.sub-beat.active {
    background-color: var(--primary);
    box-shadow: 0 0 15px var(--primary);
}

/* BPM Display */
.bpm-display-area {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    justify-content: center;
}

.bpm-value-wrapper {
    text-align: center;
    width: 140px;
}

#bpm-display {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
    line-height: 1;
    text-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
}

.bpm-label {
    font-size: 1rem;
    opacity: 0.5;
    letter-spacing: 2px;
}

.adjust-btn {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.adjust-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* Slider */
.slider-container {
    width: 100%;
    padding: 0 10px;
}

input[type=range] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    margin-top: -10px;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Play Button */
.play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(58, 123, 213, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(58, 123, 213, 0.6);
}

.play-btn.playing {
    background: #ff4757;
    box-shadow: 0 10px 30px rgba(255, 71, 87, 0.4);
}

.play-btn.playing i {
    margin-left: 0;
}

.play-btn i {
    margin-left: 4px;
    /* Optical centering for play icon */
}

/* Tap Tempo */
.tap-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    padding: 12px 30px;
    border-radius: 20px;
    font-family: var(--font-display);
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.1s;
    width: 100%;
}

.tap-btn:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.98);
}

/* Settings */
.settings-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-group label {
    font-size: 0.8rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.time-sig-controls {
    display: flex;
    gap: 10px;
}

.sig-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    padding: 8px;
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.sig-btn.active {
    background: var(--primary);
    color: #000;
    font-weight: 700;
}

select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    padding: 10px;
    border-radius: 8px;
    width: 100%;
    outline: none;
}

.share-link-btn {
    background: transparent;
    border: none;
    color: var(--text);
    opacity: 0.5;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.share-link-btn:hover {
    opacity: 1;
}