:root {
    --bg-color: #0d0d0d;
    --panel-bg: rgba(255, 255, 255, 0.05);
    --accent-color: #00f2ff;
    --text-color: #ffffff;
    --danger-color: #ff4757;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.container {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    width: 360px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

/* Pendulum Styles */
.pendulum-area {
    width: 100%;
    height: 120px;
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--glass-border);
}

.scale {
    position: absolute;
    bottom: 5px;
    width: 80%;
    display: flex;
    justify-content: space-between;
    opacity: 0.3;
}

.scale span {
    font-size: 10px;
}

.pendulum {
    position: absolute;
    top: -20px;
    width: 4px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--accent-color));
    transform-origin: top center;
    transition: transform 0.5s ease-in-out;
    /* Initial, updated JS by BPM */
}

.scale span {
    font-size: 10px;
    transition: all 0.1s ease-out;
    display: inline-block;
}

.pendulum::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -6px;
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-color);
}

/* Control Styles */
.bpm-display {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.bpm-label {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-bottom: 1.5rem;
}

.controls-row {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--accent-color);
    cursor: pointer;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
}

button {
    padding: 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

button:hover {
    background: rgba(255, 255, 255, 0.2);
}

button.active {
    background: var(--accent-color);
    color: var(--bg-color);
}

.tap-btn {
    grid-column: span 2;
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.tap-btn:active {
    background: var(--accent-color);
    color: var(--bg-color);
}

.fav-btn {
    grid-column: span 2;
    font-size: 0.9rem;
}

.rhythm-selector {
    width: 100%;
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
}

.rhythm-item {
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.5;
}

.rhythm-item.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.favorites-list {
    width: 100%;
    max-height: 100px;
    overflow-y: auto;
    font-size: 0.8rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}

.fav-item {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    opacity: 0.7;
    cursor: pointer;
}

.fav-item:hover {
    opacity: 1;
}