/**
 * Spades - Style Sheet
 * Rich green felt card table theme
 */

/* ==================== BASE ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0d3d1a; }

.lg-game-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a5c2a 0%, #0d3d1a 100%);
}

#game-canvas {
    display: block;
    cursor: default;
    border-radius: 0;
    box-shadow: none;
}

/* ==================== MENU OVERLAY ==================== */
.sp-menu {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(13,61,26,0.97), rgba(10,40,18,0.98));
    z-index: 100;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    text-align: center;
}

.sp-menu h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 3px 10px rgba(0,0,0,0.5), 0 0 40px rgba(255,215,0,0.3);
    margin-bottom: 8px;
    letter-spacing: 4px;
}

.sp-menu .sp-subtitle {
    font-size: 1rem;
    color: #8fbc8f;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.sp-menu .sp-spade-icon {
    font-size: 4rem;
    color: #ffd700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(255,215,0,0.4);
}

/* Menu Buttons */
.sp-btn {
    display: block;
    width: 260px;
    margin: 8px auto;
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, #2d7a3a, #3a9d4a);
    border: 2px solid #ffd700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sp-btn:hover {
    background: linear-gradient(135deg, #3a9d4a, #4db85e);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,215,0,0.3);
}

.sp-btn:active {
    transform: translateY(0);
}

.sp-btn-gold {
    background: linear-gradient(135deg, #b8860b, #daa520);
    border-color: #ffd700;
}

.sp-btn-gold:hover {
    background: linear-gradient(135deg, #daa520, #ffd700);
    color: #1a3a1a;
}

/* ==================== BID DIALOG ==================== */
.sp-bid-dialog {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    z-index: 110;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    text-align: center;
}

.sp-bid-dialog.active {
    display: flex;
}

.sp-bid-content {
    background: linear-gradient(135deg, rgba(13,61,26,0.95), rgba(10,40,18,0.98));
    border: 2px solid #ffd700;
    border-radius: 16px;
    padding: 30px;
    max-width: 420px;
    width: 90%;
}

.sp-bid-content h2 {
    font-size: 1.8rem;
    color: #ffd700;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(255,215,0,0.3);
}

.sp-bid-content .sp-bid-info {
    color: #8fbc8f;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.sp-bid-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}

.sp-bid-btn {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sp-bid-btn:hover {
    background: rgba(255,215,0,0.2);
    border-color: #ffd700;
    transform: scale(1.1);
}

.sp-bid-btn.selected {
    background: linear-gradient(135deg, #b8860b, #daa520);
    border-color: #ffd700;
    color: #fff;
    transform: scale(1.1);
}

.sp-bid-btn.nil-btn {
    width: auto;
    padding: 0 16px;
    font-size: 0.9rem;
    color: #ff6b6b;
    border-color: rgba(255,107,107,0.4);
}

.sp-bid-btn.nil-btn:hover {
    background: rgba(255,107,107,0.2);
    border-color: #ff6b6b;
}

.sp-bid-btn.nil-btn.selected {
    background: linear-gradient(135deg, #cc3333, #ff4444);
    border-color: #ff6b6b;
    color: #fff;
}

.sp-bid-confirm {
    display: block;
    width: 180px;
    margin: 10px auto 0;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    color: #1a3a1a;
    background: linear-gradient(135deg, #daa520, #ffd700);
    border: 2px solid #ffd700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sp-bid-confirm:hover {
    background: linear-gradient(135deg, #ffd700, #ffe44d);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,215,0,0.4);
}

.sp-bid-confirm:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==================== ROUND RESULTS ==================== */
.sp-results {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.8);
    z-index: 110;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    text-align: center;
    color: #fff;
}

.sp-results.active {
    display: flex;
}

.sp-results-content {
    background: linear-gradient(135deg, rgba(13,61,26,0.95), rgba(10,40,18,0.98));
    border: 2px solid #ffd700;
    border-radius: 16px;
    padding: 30px 40px;
    max-width: 480px;
    width: 90%;
}

.sp-results-content h2 {
    font-size: 2rem;
    color: #ffd700;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(255,215,0,0.3);
}

.sp-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.sp-results-table th {
    color: #8fbc8f;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,215,0,0.2);
}

.sp-results-table td {
    padding: 10px 12px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sp-results-table .team-name {
    font-weight: 700;
    color: #ffd700;
}

.sp-results-table .positive {
    color: #4db85e;
}

.sp-results-table .negative {
    color: #ff6b6b;
}

/* ==================== GAME OVER ==================== */
.sp-gameover {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
    z-index: 120;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    text-align: center;
    color: #fff;
}

.sp-gameover.active {
    display: flex;
}

.sp-gameover h2 {
    font-size: 2.8rem;
    color: #ffd700;
    text-shadow: 0 3px 15px rgba(255,215,0,0.4);
    margin-bottom: 10px;
}

.sp-gameover .sp-final-scores {
    font-size: 1.4rem;
    margin: 15px 0 25px;
    line-height: 2;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 600px) {
    .sp-menu h1 { font-size: 2.2rem; }
    .sp-menu .sp-spade-icon { font-size: 2.5rem; }
    .sp-btn { width: 200px; padding: 10px 20px; font-size: 0.9rem; }
    .sp-bid-btn { width: 40px; height: 40px; font-size: 0.95rem; }
    .sp-bid-content { padding: 20px; }
    .sp-results-content { padding: 20px; }
}
