/* Rusty Checkers - CSS Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: system-ui, -apple-system, sans-serif;
    color: #eee;
}

.game-container {
    display: flex;
    gap: 2rem;
    padding: 2rem;
}

.board-wrapper {
    background: #16213e;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 200px;
}

.panel {
    background: #16213e;
    padding: 1.5rem;
    border-radius: 8px;
}

.panel h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin-bottom: 1rem;
}

.player-indicator {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.player-indicator.active {
    background: #e94560;
}

.player-indicator .piece-preview {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.player-indicator .piece-preview.dark {
    background: #c41e3a;
    border: 2px solid #ff6b6b;
}

.player-indicator .piece-preview.light {
    background: #f0f0f0;
    border: 2px solid #ccc;
}

.winner-banner {
    background: #e94560;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.winner-banner h2 {
    color: #fff;
    margin-bottom: 1rem;
}

button {
    background: #0f3460;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

button:hover {
    background: #1a5090;
}

.rules-subtitle {
    color: #aaa;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.rules-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rules-list li {
    padding-left: 1rem;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #ccc;
}

.rules-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #e94560;
}

/* Landing Page */

.landing-page {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.landing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    width: 180px;
    height: 180px;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: #eee;
}

.tagline {
    font-size: 1.1rem;
    color: #888;
}

.play-button {
    background: #0f3460;
    color: #fff;
    border: none;
    padding: 1rem 3rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: background 0.2s, box-shadow 0.2s;
    margin-top: 0.5rem;
}

.play-button:hover {
    background: #1a5090;
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.4);
}

.footer {
    position: absolute;
    bottom: 2rem;
    font-size: 0.8rem;
    color: #555;
}

/* Mode Selection */

.mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mode-button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.tournament-btn {
    background: #e94560;
}

.tournament-btn:hover {
    background: #ff6b8a;
}

/* Tournament Login */

.tournament-login {
    min-width: 300px;
}

.tournament-info {
    background: #0d1b2a;
    border: 1px solid #334;
    border-left: 3px solid #e94560;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.tournament-info h3 {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: #aaa;
}

.form-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: #0d1b2a;
    border: 1px solid #334;
    border-radius: 4px;
    color: #eee;
    font-size: 1rem;
    outline: none;
}

.form-input:focus {
    border-color: #e94560;
}

.room-code-input {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
}

.tournament-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tournament-buttons .mode-button {
    flex: 1;
}

.back-button {
    width: 100%;
    background: transparent;
    border: 1px solid #555;
    color: #888;
}

.back-button:hover {
    border-color: #eee;
    color: #eee;
}

/* Bracket Panel */

.bracket-panel {
    min-width: 400px;
}

.room-code-display {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: #0d1b2a;
    border-radius: 4px;
    text-align: center;
}

.code-label {
    color: #888;
}

.code-value {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: #e94560;
}

.bracket-lobby {
    margin-top: 1rem;
}

.bracket-lobby h3 {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.player-list {
    list-style: none;
    margin-bottom: 1rem;
}

.player-item {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #1a2540;
    font-size: 0.95rem;
}

.player-item .connected {
    color: #4caf50;
}

.player-item .disconnected {
    color: #888;
}

.start-button {
    width: 100%;
    background: #e94560;
    padding: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.start-button:hover {
    background: #ff6b8a;
}

.waiting-text {
    text-align: center;
    color: #888;
    font-style: italic;
    margin-top: 0.5rem;
}

.your-turn {
    color: #e94560;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Bracket Display */

.bracket-container {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 160px;
}

.round-title {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
}

.bracket-match {
    background: #0d1b2a;
    border-radius: 4px;
    padding: 0.5rem;
    border-left: 3px solid #334;
}

.match-player {
    padding: 0.3rem 0.5rem;
    font-size: 0.9rem;
}

.match-player.winner {
    color: #4caf50;
    font-weight: 600;
}

.match-player.eliminated {
    color: #666;
    text-decoration: line-through;
}

.match-vs {
    text-align: center;
    color: #555;
    font-size: 0.75rem;
}

.match-status {
    text-align: center;
    font-size: 0.7rem;
    color: #888;
    margin-top: 0.25rem;
}

/* Tournament Winner */

.tournament-winner {
    margin-top: 1.5rem;
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #e94560, #0f3460);
    border-radius: 8px;
}

.tournament-winner h2 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.champion-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}