:root {
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --highlight: #0f3460;
    --accent: #e94560;
    --text-color: #f1f1f1;
    --matter: #4caf50;
    --antimatter: #f44336;
    --special: #ffd700;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.hidden {
    display: none !important;
}

.card-panel {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    margin-top: 50px;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 5px;
}

input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #222;
    color: white;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.2s;
    margin: 5px;
}

.primary {
    background-color: var(--highlight);
    color: white;
}

.secondary {
    background-color: #444;
    color: white;
}

.danger {
    background-color: var(--accent);
    color: white;
}

.start-btn {
    background-color: var(--matter);
    color: white;
    width: 100%;
}

.primary:hover {
    background-color: #1a5cba;
}

/* Game Area */
.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.info-box {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    min-width: 150px;
}

.big-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--special);
}

.hand-area {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    min-height: 120px;
}

.card {
    width: 80px;
    height: 120px;
    background: white;
    color: black;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid #ccc;
    position: relative;
}

.card:focus {
    outline: 3px solid var(--accent);
    transform: scale(1.05);
}

.card.focused {
    outline: 4px solid var(--special);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--special);
}

.card.matter {
    background-color: #e8f5e9;
    border-color: var(--matter);
}

.card.antimatter {
    background-color: #ffebee;
    border-color: var(--antimatter);
}

.card.special {
    background-color: #fffde7;
    border-color: var(--special);
}

.opponents-area {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.opponent {
    background: #2a2a40;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.opponent.active {
    border: 2px solid var(--accent);
}

.table-area {
    margin: 20px 0;
    padding: 20px;
    border: 2px dashed #444;
    border-radius: 10px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none !important;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.ls-player-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.ls-player-btn {
    background: var(--highlight);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.ls-player-btn:hover {
    background: #1a5cba;
}

.controls {
    margin-top: 20px;
}

/* Timer Display */
.timer-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--special);
    margin-top: 8px;
    padding: 5px 10px;
    border-radius: 5px;
    background: rgba(255, 215, 0, 0.1);
}

.timer-display.timer-warning {
    color: var(--accent);
    background: rgba(233, 69, 96, 0.2);
    animation: pulse 0.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.5;
    }
}