/* Shared styles for all game pages */
body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 20px;
}

.button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: #45a049;
}

.button.active {
    background-color: #2196F3;
}

.home-button {
    background-color: #666;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
    position: absolute;
    top: 20px;
    left: 20px;
}

.home-button:hover {
    background-color: #555;
}

#imageContainer {
    margin-top: 20px;
}

img {
    max-width: 90%;
    height: auto;
}

.main-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 30px;
    margin: 20px auto;
    max-width: 1200px;
}

.action-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin: 20px auto;
    max-width: 1200px;
    border: 1px solid #e9ecef;
}

.action-panel h3 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 18px;
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.add-player-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    color: white;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.add-player-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.add-result-btn {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border: none;
    color: white;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.add-result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.radio-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: auto;
    margin: 0;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.radio-row {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.radio-option.full-width {
    flex: none;
    width: 100%;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-option .radio-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 60px;
    width: 100%;
    box-sizing: border-box;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-color: #4CAF50;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.radio-option:hover .radio-custom {
    border-color: #4CAF50;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.radio-option span {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .radio-group {
        gap: 12px;
    }
    
    .radio-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .radio-option {
        min-width: auto;
    }
    
    .radio-option.full-width {
        width: auto;
    }
    
    .radio-option .radio-custom {
        padding: 16px 20px;
        min-height: 70px;
    }
    
    .radio-option span {
        font-size: 16px;
    }
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-btn.cancel {
    background-color: #6c757d;
    color: white;
}

.modal-btn.cancel:hover {
    background-color: #5a6268;
}

.modal-btn.confirm {
    background-color: #2196F3;
    color: white;
}

.modal-btn.confirm:hover {
    background-color: #1976D2;
}

.modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Status message styles */
.status-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    max-width: 300px;
    word-wrap: break-word;
}

.status-message.success {
    background-color: #28a745;
}

.status-message.error {
    background-color: #dc3545;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
