/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Halcyonic-inspired color scheme */
    --primary-color: #ed391b;
    --primary-hover: #fd492b;
    --primary-active: #ce1a00;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --error-color: #dc3545;
    --warning-color: #f59e0b;
    --background: #d4d9dd;
    --surface: #ffffff;
    --text-primary: #474f51;
    --text-secondary: #64748b;
    --border: #c6c8c8;
    --header-bg: #3b4346;
    --header-text: #c6c8c8;
    --header-text-hover: #f6f8f8;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.15);
    --shadow-lg: 3px 3px 3px 1px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header */
header {
    background-color: var(--header-bg);
    border-bottom: 1px solid #272d30;
    box-shadow: inset 0px -1px 0px 0px #51575a;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex: 1;
}

/* Hamburger Menu Button */
.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s;
    border-radius: 2px;
}

.hamburger-menu:hover span {
    background-color: var(--header-text-hover);
}

/* Hamburger Menu Overlay */
.hamburger-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.hamburger-overlay.active {
    display: block;
}

/* Hamburger Menu Content */
.hamburger-content {
    position: fixed;
    top: 0;
    right: -300px;
    width: 250px;
    height: 100%;
    background-color: var(--header-bg);
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 4rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hamburger-content.active {
    right: 0;
}

.hamburger-content button {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-active));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: inset 0px 0px 0px 1px rgba(0, 0, 0, 0.75),
                inset 0px 2px 0px 0px rgba(255, 192, 192, 0.3),
                inset 0px 0px 0px 2px rgba(255, 96, 96, 0.5),
                var(--shadow-lg);
    text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.5);
}

.hamburger-content button:hover {
    background: linear-gradient(to bottom, var(--primary-hover), var(--primary-color));
}

.hamburger-content button.secondary {
    background: linear-gradient(to bottom, var(--secondary-color), #475569);
    box-shadow: inset 0px 0px 0px 1px rgba(0, 0, 0, 0.5),
                var(--shadow);
}

.hamburger-content button.secondary:hover {
    background: linear-gradient(to bottom, #708090, var(--secondary-color));
}

nav button, nav a {
    padding: 0.5rem 1rem;
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-active));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: inset 0px 0px 0px 1px rgba(0, 0, 0, 0.75),
                inset 0px 2px 0px 0px rgba(255, 192, 192, 0.3),
                inset 0px 0px 0px 2px rgba(255, 96, 96, 0.5),
                var(--shadow-lg);
    text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.5);
}

nav button:hover, nav a:hover {
    background: linear-gradient(to bottom, var(--primary-hover), var(--primary-color));
}

nav button:active, nav a:active {
    background: linear-gradient(to bottom, var(--primary-active), var(--primary-color));
}

nav button.secondary {
    background: linear-gradient(to bottom, var(--secondary-color), #475569);
    box-shadow: inset 0px 0px 0px 1px rgba(0, 0, 0, 0.5),
                var(--shadow);
}

nav button.secondary:hover {
    background: linear-gradient(to bottom, #708090, var(--secondary-color));
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Cards */
.card {
    background-color: var(--surface);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Inline label for checkboxes */
label input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    vertical-align: middle;
}

input, textarea, select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 1rem;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-block;
    text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.5);
}

.btn-primary {
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-active));
    color: white;
    box-shadow: inset 0px 0px 0px 1px rgba(0, 0, 0, 0.75),
                inset 0px 2px 0px 0px rgba(255, 192, 192, 0.3),
                inset 0px 0px 0px 2px rgba(255, 96, 96, 0.5),
                var(--shadow-lg);
}

.btn-primary:hover {
    background: linear-gradient(to bottom, var(--primary-hover), var(--primary-color));
}

.btn-primary:active {
    background: linear-gradient(to bottom, var(--primary-active), var(--primary-color));
}

.btn-secondary {
    background: linear-gradient(to bottom, var(--secondary-color), #475569);
    color: white;
    box-shadow: inset 0px 0px 0px 1px rgba(0, 0, 0, 0.5),
                var(--shadow);
}

.btn-secondary:hover {
    background: linear-gradient(to bottom, #708090, var(--secondary-color));
}

.btn-success {
    background: linear-gradient(to bottom, var(--success-color), #16a34a);
    color: white;
    box-shadow: inset 0px 0px 0px 1px rgba(0, 0, 0, 0.5),
                var(--shadow);
}

.btn-success:hover {
    background: linear-gradient(to bottom, #22d65f, var(--success-color));
}

.btn-danger {
    background: linear-gradient(to bottom, var(--error-color), #c82333);
    color: white;
    box-shadow: inset 0px 0px 0px 1px rgba(0, 0, 0, 0.5),
                var(--shadow);
}

.btn-danger:hover {
    background: linear-gradient(to bottom, #e4606d, var(--error-color));
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(50%);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: var(--background);
    font-weight: 600;
    color: var(--text-primary);
}

tr:hover {
    background-color: var(--background);
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.message-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.message-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.message-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

/* Score Entry Specific Styles */
.score-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.score-buttons button {
    flex: 1;
    padding: 1rem;
    font-size: 1.25rem;
    font-weight: bold;
}

.score-buttons button.selected {
    background-color: var(--success-color);
    border: 2px solid #16a34a;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.25rem;
    }

    nav {
        gap: 0.5rem;
    }

    nav button, nav a {
        padding: 0.375rem 0.75rem;
        font-size: 0.813rem;
    }

    .card {
        padding: 1rem;
    }

    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 0.5rem;
    }
}

/* Utility Classes */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

.flex {
    display: flex;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--surface);
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
