/* Additional CSS can be added here if needed */

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

:root {
    --white: #ffffff;
    --black: #000000;
    --accent: #003049;
    --accent-hover: #002031;
    --accent-bg: #b0c9ff;
    --accent-dark: #002c8c;
    --secondary: #c1121f;
    --secondary-hover: #a7101a;
    --secondary-bg: #f7dfe1;
    --secondary-dark: #7d0a12;
    --tertiary: #780000;
    --tertiary-hover: #610101;
    --tertiary-bg: #d9b8b5;
    --dark-grey: #333333;
    --mid-grey: #666666;
    --light-grey: #c3c3c3;
}

body {
    font-family: -apple-system, "Helvetica", sans-serif;
    font-size: 18px;
    font-weight: 300;
    line-height: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--black);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

article {
    max-width: 700px;
    margin: 0 auto;
}

article p,
article ul {
    font-size: 18px;
    font-weight: 300;
    line-height: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--black);
}

article ul {
    list-style: disc;
    padding-left: 1.5rem;
}

article a {
    color: var(--accent);
    text-decoration: underline;
}

article ul li {
    margin-bottom: 1.5rem;
}

hr {
    border: 0;
    border-top: 1px solid var(--light-grey);
    margin: 2rem 0;
}

header {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

header nav {
    font-size: 16px;
    margin-top: 0.4rem;
    margin-bottom: 0.4rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
}

nav a {
    text-decoration: none;
    color: var(--black);
    font-weight: 500;
}

nav a:hover {
    color: var(--accent);
}

main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.card {
    background: var(--white);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.huge-text,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Gill Sans", sans-serif;
    color: var(--black);
    line-height: 1.2;
}



h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 3rem;
}

.huge-text {
    font-size: 6rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 2rem;
    display: block;
}

h2 {
    font-size: 2rem;
    font-weight: 550;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 450;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent);
    color: var(--white);
    text-decoration: none;
    border: 2px solid var(--accent);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: var(--accent-hover);
}

.btn-2 {
    background-color: var(--white);
    border: 2px solid var(--accent);
    color: var(--accent);
}

.btn-2:hover {
    background-color: var(--accent);
    border: 2px solid var(--accent);
    color: var(--white);
}

.btn-3 {
    background-color: var(--mid-grey);
}

.btn-3:hover {
    background-color: var(--light-grey);
}

.btn-danger {
    background-color: var(--tertiary);
    border: 2px solid var(--tertiary);
    color: var(--white);
}

.btn-danger:hover {
    background-color: var(--tertiary-hover);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--light-grey);
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 48, 73, 0.2);
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

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

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tr:hover {
    background-color: #f8f9fa;
}

.callout {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    background-color: var(--secondary-bg);
    border-color: var(--secondary-dark);
    color: var(--secondary-dark);
}

.callout-error {
    background-color: var(--tertiary-bg);
    border-color: var(--tertiary);
    color: var(--tertiary);
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: 1fr 1fr;
}

.grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    h1 {
        font-size: 2rem;
    }
}

footer {
    background-color: var(--white);
    color: var(--black);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-weight: 700;
}

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

.text-muted {
    color: var(--mid-grey);
}

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

.mb-3 {
    margin-bottom: 1.5rem;
}

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

.mt-3 {
    margin-top: 1.5rem;
}

.img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}
.caption {
    text-align: center;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--mid-grey);
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

/* Layout utilities */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.center-grid {
    place-items: center;
    min-height: 60vh;
}

.btn-full {
    width: 100%;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Form utilities */
.form-card {
    width: 100%;
    max-width: 400px;
}

.form-card-wide {
    width: 100%;
    max-width: 500px;
}

/* Spacing utilities */
.gap-1 {
    gap: 1rem;
}

.gap-half {
    gap: 0.5rem;
}

/* Game-specific components */
.match-card {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--light-grey);
    border-radius: 4px;
}

.provisional-list {
    min-height: 200px;
    border: 2px dashed var(--light-grey);
    border-radius: 4px;
    padding: 1rem;
}

.provisional-item {
    background: #f8f9fa;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border-radius: 4px;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.players-list {
    max-height: 500px;
    overflow-y: auto;
}

.player-item {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.player-item-selected {
    background-color: #ffebee;
    opacity: 0.6;
}

.already-selected-text {
    color: #d32f2f;
    font-size: 0.8rem;
}

.highlighted-row {
    background-color: #e3f2fd;
}

.league-card {
    padding: 1rem;
    border: 1px solid var(--light-grey);
    border-radius: 4px;
}

.team-selection {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--light-grey);
    border-radius: 4px;
}

.team-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.team-list-item {
    padding: 0.25rem 0;
}

.score-large {
    font-size: 1.2em;
    font-weight: bold;
}

.score-small {
    font-size: 0.9em;
    color: var(--mid-grey);
}

.font-bold {
    font-weight: bold;
}

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

/* Custom selection list styling */
.sortable-list {
    min-height: 100px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 1rem;
}

.sortable-list.drag-over {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.player-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-card:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.player-card.selected {
    background-color: #e3f2fd;
    border-color: #2196f3;
}

.player-card.unavailable {
    background-color: #ffebee;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner {
    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); }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .card {
        padding: 1rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
