/* Spades Game - Specific Styles */

/* Team Cards Enhancement */
.team-card {
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.team-card:hover {
    transform: translateY(-2px);
}

#team1-card .team-number {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

#team2-card .team-number {
    background: linear-gradient(135deg, #6621a5, #8b3fd1);
}

/* Form Enhancements */
.form-input:valid:not(:placeholder-shown) {
    border-color: var(--success);
}

.form-input:invalid:not(:placeholder-shown):not(:focus) {
    border-color: var(--danger);
}

/* Custom Score Input */
#custom-score-container {
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Seating Order
   ======================================== */
.seating-order-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.seating-position {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.seating-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dealer-badge {
    background: var(--accent-purple);
    color: white;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 700;
}

.partner-badge {
    background: rgba(99, 102, 241, 0.3);
    color: var(--accent-purple-light);
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 500;
}

.seating-select {
    min-height: 42px;
    font-size: 0.9rem;
}

.seating-select:disabled {
    background: var(--bg-dark);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.seating-actions {
    margin-bottom: var(--spacing-md);
}

.seating-preview {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    animation: fadeIn 0.3s ease;
}

.seating-preview-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.seating-preview-order {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.seating-preview-order .arrow {
    color: var(--text-muted);
    margin: 0 4px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 480px) {
    .seating-order-grid {
        grid-template-columns: 1fr;
    }
}

/* House Rules Section */
#house-rules .collapsible-inner {
    background: rgba(0, 0, 0, 0.2);
}

#house-rules h4 {
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

/* Number Input Group Styling */
.number-input-group {
    display: grid;
    grid-template-columns: 140px 80px auto;
    align-items: center;
    gap: var(--spacing-sm);
}

.number-input-group label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.number-input-group input {
    text-align: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    min-height: 40px;
}

/* Radio Group Enhancement for Bag Penalty */
.radio-btn label small {
    display: block;
    margin-top: 2px;
}

/* Start Game Button States */
#start-game-btn {
    position: relative;
    overflow: hidden;
}

#start-game-btn:not(:disabled) {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: var(--shadow-md), 0 0 0 0 rgba(139, 92, 246, 0.4);
    }
    50% {
        box-shadow: var(--shadow-lg), 0 0 0 10px rgba(139, 92, 246, 0);
    }
}

#start-game-btn:disabled {
    background: var(--bg-card);
    box-shadow: none;
}

#validation-message {
    font-size: 0.875rem;
    transition: opacity var(--transition-fast);
}

#validation-message.hidden {
    opacity: 0;
}

/* Toggle Switch Label Enhancement */
.toggle-switch span:last-child {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.toggle-switch input:checked ~ span:last-child {
    color: var(--text-primary);
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .number-input-group {
        grid-template-columns: 1fr 70px auto;
    }

    .number-input-group label {
        font-size: 0.8rem;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-btn {
        min-width: 100%;
    }

    #random-dealer-btn {
        width: 100%;
    }

    .d-flex.gap-2 {
        flex-direction: column;
    }
}

/* Page Header Spade Icon */
.page-header-icon {
    color: var(--suit-spade);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Corner Suits - All Spades for this page */
.corner-suit {
    color: rgba(0, 0, 0, 0.3);
}

/* ========================================
   Resume Game Banner
   ======================================== */
.resume-game-banner {
    background: linear-gradient(135deg, rgba(102, 33, 165, 0.3), rgba(139, 63, 209, 0.2));
    border: 2px solid var(--accent-purple);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    animation: resumePulse 2s ease-in-out infinite;
}

@keyframes resumePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 33, 165, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(102, 33, 165, 0.2);
    }
}

.resume-game-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.resume-game-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.resume-icon {
    font-size: 2rem;
}

.resume-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.resume-details strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.resume-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-purple-light);
}

.resume-round {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.resume-game-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.8rem;
    min-height: 36px;
}

@media (max-width: 480px) {
    .resume-game-content {
        flex-direction: column;
        text-align: center;
    }

    .resume-game-info {
        flex-direction: column;
    }

    .resume-game-actions {
        width: 100%;
        justify-content: center;
    }

    .resume-game-actions .btn {
        flex: 1;
    }
}
