/* Core variables and resets */
:root {
    --max-width: 1200px;
    --primary-color: #008080; /* Muted billiard table green */
    --primary-dark: #64c997; /* Darker and less vibrant green */
    --dark-bg: #1a1a1a;
    --header-height: 140px;
    --border-radius: 8px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    font-family: Arial, sans-serif;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Common Buttons */
.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Modal styles */
#notification-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 400px;
    width: 100%;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.modal-status-bar {
    height: 4px;
    width: 100%;
}

.modal-status-bar.success {
    background: #10B981;
}

.modal-status-bar.error {
    background: #EF4444;
}

.modal-close {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    background: #f3f4f6;
}

.modal-body {
    padding: 2rem;
}

.modal-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
}

.success-icon {
    fill: #10B981;
}

.error-icon {
    fill: #EF4444;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.modal-message {
    color: #666;
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-button {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal-button.success {
    background: #10B981;
    color: white;
}

.modal-button.success:hover {
    background: #059669;
}

.modal-button.error {
    background: #EF4444;
    color: white;
}

.modal-button.error:hover {
    background: #DC2626;
}

/* Animation */
.modal-overlay {
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    animation: slideIn 0.3s ease-out;
}

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

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

.flash-messages {
    max-width: 800px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    text-align: center;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    :root {
        --header-height: 120px; /* Reduce header height for mobile */
    }
    
    html, body {
        overflow-x: hidden;
        width: 100%;
        height: 100%;
    }

    body {
        position: relative;
    }
}