/* Admin Panel CSS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* Admin Body */
.admin-body {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

/* Admin Container */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Admin Header */
.admin-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-title h1 {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 2.25rem;
    color: #1e40af;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.admin-title p {
    font-size: 1rem;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0.025em;
    font-family: 'Inter', sans-serif;
}

.admin-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Admin Main */
.admin-main {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Admin Grid */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.admin-section {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

.admin-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
}

.admin-section.full-width {
    grid-column: 1 / -1;
}

.admin-section h3 {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.5rem;
    color: #1e40af;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: -0.025em;
}

.admin-section h4 {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.125rem;
    color: #475569;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.025em;
}

/* Admin Forms */
.admin-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.025em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Quick Actions */
.quick-offers,
.quick-scores {
    margin-top: 20px;
}

.offer-buttons,
.score-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid #3b82f6;
    color: #3b82f6;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.025em;
}

.btn-outline:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Game Status */
.game-status {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.game-status p {
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.game-status strong {
    color: #ff6b6b;
}

/* Game Actions */
.game-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Player Decision Controls */
.player-decision-controls {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.player-decision-controls p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #333;
}

.decision-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.decision-buttons .btn-large {
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 180px;
}

/* Session Info */
.session-info {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    margin-bottom: 20px;
    border-radius: 12px;
    padding: 20px;
}

.session-info h3 {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Space Grotesk', sans-serif;
}

.session-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.session-detail {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.session-detail strong {
    color: #ffd93d;
    min-width: 100px;
}

.session-detail code {
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 5px;
    font-family: monospace;
    flex: 1;
    word-break: break-all;
}

.session-detail .btn {
    margin-left: auto;
}

/* Boxes Display */
.boxes-admin {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
}

.boxes-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.box-display {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.box-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.box-display.selected {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
    border-color: #45b7aa;
}

.box-display.opened {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-color: #4ecdc4;
}

.box-display small {
    display: block;
    font-size: 0.8rem;
    margin-top: 5px;
    opacity: 0.8;
}

.no-boxes-message {
    background: rgba(255, 107, 107, 0.1);
    border: 2px dashed #ff6b6b;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    color: #ff6b6b;
    font-weight: 600;
    margin: 10px 0;
}

.disabled-message {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #f39c12;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    margin: 10px 0;
}

.disabled-message p {
    margin: 5px 0;
    color: #856404;
    font-weight: 600;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
    font-weight: 600;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    color: #155724;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
    color: #721c24;
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: 2px solid #dc3545;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Warning Button */
.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
    border: 2px solid #ffc107;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.disabled-message p:first-child {
    font-size: 1.1em;
}

/* Game State Grid */
.game-state-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.state-column h4 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

/* Cards Display */
.cards-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.card-section {
    text-align: center;
}

.card-section h4 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
}

.card-display {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.card {
    width: 100px;
    height: 150px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.card.spades,
.card.clubs {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
}

.card.hearts,
.card.diamonds {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    color: white;
}

.card-value {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    font-weight: bold;
}

.card-suit {
    font-size: 2rem;
    line-height: 1;
}

.card-placeholder {
    width: 100px;
    height: 150px;
    border: 3px dashed #ccc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    color: #666;
    font-weight: 600;
}

/* History Display */
.history-display {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.history-card {
    display: flex;
    align-items: center;
}

.card.small {
    width: 30px;
    height: 45px;
    font-size: 0.7rem;
    padding: 3px;
}

.card.small .card-value {
    font-size: 0.8rem;
}

.card.small .card-suit {
    font-size: 1rem;
}

/* Card Controls */
.card-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-container {
        padding: 10px;
    }
    
    .admin-header {
        flex-direction: column;
        text-align: center;
    }
    
    .admin-title h1 {
        font-size: 1.8rem;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .game-state-grid,
    .cards-display {
        grid-template-columns: 1fr;
    }
    
    .boxes-display {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    
    .offer-buttons,
    .score-buttons {
        justify-content: center;
    }
    
    .game-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .card {
        width: 80px;
        height: 120px;
    }
    
    .card-placeholder {
        width: 80px;
        height: 120px;
    }
}

/* Session Manager Specific Styles */
.session-links {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #cbd5e1;
}

.session-links p {
    color: #475569;
    font-weight: 500;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
}

.session-links strong {
    color: #1e40af;
    font-weight: 600;
}

.url-display {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.url-display code {
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #1e40af;
    flex: 1;
    word-break: break-all;
    border: 1px solid #cbd5e1;
}

.session-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.session-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
    justify-content: center;
}

.session-actions .btn {
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.025em;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #4ecdc4;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

