/* style.css */
:root {
    --bg-color: #fdfdfd;
    --text-color: #333;
    --red: #FF6B6B;
    --blue: #4D96FF;
    --green: #6BCB77;
    --yellow: #FFD93D;
    --accent: #FF9F29;
    --link-color: #0000EE;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
}

/* Header & Typography */
h1 {
    font-size: 2rem;
    color: #ff6f91;
    text-shadow: 2px 2px 0px #f9f871;
    margin: 20px 0 10px;
}

h2 {
    color: #2c3e50;
    border-bottom: 3px dashed var(--accent);
    display: inline-block;
    padding-bottom: 5px;
    margin-top: 30px;
}

h3 {
    color: #555;
    background: #9fff96;
    padding: 5px 15px;
    border-radius: 15px;
    display: inline-block;
}

/* Share Buttons */
.share-area {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.share-btn {
    text-decoration: none;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    display: inline-block;
    transition: transform 0.1s;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.sb-x { background-color: #000; }
.sb-fb { background-color: #1877f2; }
.sb-line { background-color: #06c755; }
.sb-email { background-color: #7f8c8d; }
.sb-native { background-color: #e67e22; cursor: pointer; }

/* Player Count Controls */
.controls {
    margin: 15px 0;
}

.mode-btn {
    background: white;
    border: 2px solid #ddd;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    color: #555;
}

.mode-btn.active-mode {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Buzzer Area */
.buzzer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    min-height: 40vh; /* Ensure visibility */
    flex-wrap: nowrap;
}

.buzzer {
    width: 20vw;
    height: 20vw;
    max-width: 150px;
    max-height: 150px;
    border-radius: 50%;
    border: none;
    outline: none;
    cursor: pointer;
    box-shadow: 0 8px 0 rgba(0,0,0,0.2), 0 15px 20px rgba(0,0,0,0.1);
    transition: all 0.1s;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: rgba(255,255,255,0.8);
    font-size: 1.2rem;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.buzzer:active {
    transform: translateY(4px);
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
}

.b-red { background: var(--red); }
.b-blue { background: var(--blue); }
.b-green { background: var(--green); }
.b-yellow { background: var(--yellow); }

/* Active (Winner) State - Flashing */
.active-buzzer {
    animation: flash 0.5s infinite alternate;
    box-shadow: 0 0 50px 20px currentColor;
    z-index: 10;
}

@keyframes flash {
    from { filter: brightness(1); transform: scale(1); }
    to { filter: brightness(1.5); transform: scale(1.1); }
}

/* Landscape Mobile Optimization */
@media (max-width: 900px) and (orientation: landscape) {
    .buzzer-container {
        justify-content: space-between;
        width: 90%;
        margin: 0 auto;
    }
    .buzzer {
        width: 18vh;
        height: 18vh;
    }
    h1, .share-area, .seo-content {
        display: none; /* Focus on game in landscape mobile */
    }
    /* Keep controls visible but compact */
    .controls { margin: 5px; }
}

/* Keyboard Hints */
.key-hint {
    display: block;
    font-size: 0.8rem;
    margin-top: 5px;
    color: rgba(0,0,0,0.3);
}

/* Volume Control */
.volume-area {
    margin: 20px auto;
    width: 80%;
    max-width: 300px;
    background: #fff0f5;
    padding: 10px;
    border-radius: 10px;
}
input[type=range] {
    width: 100%;
}

/* SEO Content Area */
.seo-content {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    text-align: left;
    line-height: 1.8;
}

.seo-content ul {
    background: #f9f9f9;
    padding: 20px 40px;
    border-radius: 10px;
    border: 1px solid #eee;
}

/* Footer Links */
.footer-links, .related-links {
    margin: 30px 0;
    padding: 20px;
    background: #f5f5f5;
}

.link-group {
    margin: 10px 0;
}

a {
    color: var(--link-color);
}