* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'DM Sans', sans-serif;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 500;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: url('background.png') center center / cover no-repeat;
}

.title-overlay {
    flex: 1;
    min-height: 35vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.logo-overlay {
    height: 72px;
    width: auto;
    filter: brightness(0) invert(1);
}

.panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

.game-selector {
    display: flex;
    margin-bottom: 16px;
    background: #eeeeee;
    border-radius: 8px;
    position: relative;
}

.segment-indicator {
    position: absolute;
    top: 0;
    height: 48px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    transition: left 0.28s cubic-bezier(0.34, 1.12, 0.64, 1), width 0.28s cubic-bezier(0.34, 1.12, 0.64, 1);
    pointer-events: none;
    z-index: 0;
}

.game-btn {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border: 1px solid transparent;
    background: transparent;
    color: #808080;
    border-radius: 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.game-btn:hover {
    color: #606060;
}

.game-btn:first-child {
    border-radius: 8px 0 0 8px;
}

.game-btn:last-child {
    border-radius: 0 8px 8px 0;
}

.game-btn.active {
    color: #000000;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.tempo-buttons {
    display: flex;
    background: #eeeeee;
    border-radius: 8px;
    position: relative;
}

.ratio-font {
    font-family: 'DM Mono', monospace;
}

.tempo-btn {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #808080;
    font-family: 'DM Mono', monospace;
    border-radius: 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.tempo-btn:hover {
    color: #606060;
}

.tempo-btn:first-child {
    border-radius: 8px 0 0 8px;
}

.tempo-btn:last-child {
    border-radius: 0 8px 8px 0;
}

.tempo-btn.active {
    color: #000000;
}

.play-btn {
    height: 48px;
    padding: 0 24px;
    border: none;
    background: #212121;
    color: #ffffff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover {
    background: #333333;
}

.play-btn:active {
    background: #111111;
}

.play-btn.playing {
    background: #ef4444;
}

.play-btn.playing:hover {
    background: #f87171;
}

.play-btn.playing:active {
    background: #dc2626;
}

.info {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    font-weight: 400;
}

.info strong {
    font-weight: 500;
    color: #4b5563;
}

@media (min-width: 769px) {
    body {
        justify-content: center;
    }

    .title-overlay {
        flex: 0 0 auto;
        padding-bottom: 0;
    }

    .panel {
        margin-top: -24px;
    }
}

@media (max-width: 768px) {
    .panel {
        max-width: none;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        border-radius: 16px 16px 0 0;
        padding: 24px 20px 32px;
    }
}

@media (max-width: 480px) {
    .logo-overlay {
        height: 64px;
    }

    .panel {
        padding: 24px 20px 32px;
    }
}
