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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

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

/* Navigation */
nav {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

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

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Cards */
.wedstrijd-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.wedstrijd-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.team {
    flex: 1;
    text-align: center;
}

.team-naam {
    font-size: 1.5rem;
    font-weight: bold;
}

.vs {
    font-weight: bold;
    color: #999;
    margin: 0 1rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #667eea;
    color: white;
    margin-top: 0.5rem;
}

.badge.neutral {
    background: #6c757d;
}

/* Tables */
.spelers-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.spelers-table thead {
    background: #f8f9fa;
}

.spelers-table th,
.spelers-table td {
    padding: 1rem;
    text-align: left;
}

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

/* Position Badges */
.positie-doelman {
    background: #ffc107;
    color: #000;
}

.positie-verdediger {
    background: #28a745;
    color: white;
}

.positie-middenvelder {
    background: #17a2b8;
    color: white;
}

.positie-aanvaller {
    background: #dc3545;
    color: white;
}

/* Team Sections */
.team-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

/* Edit Team */
.edit-team-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.current-selection,
.available-players {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-box {
    margin-bottom: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
}

.spelers-scroll {
    max-height: 600px;
    overflow-y: auto;
}

/* Warning Messages */
.warning-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.info-message {
    background: #d1ecf1;
    border: 1px solid #17a2b8;
    color: #0c5460;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Forms */
.form-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
}

/* Wedstrijd Page */
.wedstrijd-header {
    text-align: center;
    margin-bottom: 2rem;
}

.wedstrijd-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
}

.team-naam-groot {
    font-size: 2.5rem;
    font-weight: bold;
}

.vs-groot {
    font-size: 2rem;
    color: #999;
}

.score-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

.score-box {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    min-width: 200px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.score-box.winning {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.score-box .score {
    font-size: 4rem;
    font-weight: bold;
}

.score-separator {
    font-size: 3rem;
    font-weight: bold;
    color: #999;
}

.uitslag-box {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.uitslag {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.uitslag.winst {
    color: #28a745;
}

.uitslag.gelijk {
    color: #17a2b8;
}

.opstellingen-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.opstelling-table {
    width: 100%;
}

.opstelling-table tfoot {
    background: #f8f9fa;
    font-weight: bold;
}

.punten {
    text-align: center;
    font-size: 1.2rem;
}

.btn-edit-score {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.btn-edit-score:hover {
    opacity: 1;
}

/* Modal */
.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: 10% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 500px;
    max-width: 90%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.score-input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.5rem;
    text-align: center;
    border: 2px solid #667eea;
    border-radius: 8px;
}

/* Opstelling Form */
.spelers-selectie {
    margin-bottom: 2rem;
}

.positie-groep {
    margin-bottom: 2rem;
}

.positie-groep h4 {
    margin-bottom: 1rem;
    color: #667eea;
}

.spelers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.speler-checkbox {
    cursor: pointer;
}

.speler-checkbox input[type="checkbox"] {
    display: none;
}

.speler-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s;
}

.speler-checkbox input[type="checkbox"]:checked + .speler-card {
    border-color: #667eea;
    background: #f0f4ff;
}

.speler-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.selected-count {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1.2rem;
}

.radio-group {
    display: grid;
    gap: 1rem;
}

.radio-option {
    cursor: pointer;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-label {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s;
}

.radio-option input[type="radio"]:checked + .radio-label {
    border-color: #667eea;
    background: #f0f4ff;
}

.radio-label:hover {
    border-color: #667eea;
}

.help-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

footer a {
    color: #a0aec0;
    text-decoration: none;
}

footer a:hover {
    color: white;
    text-decoration: underline;
}

.footer-regel {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.footer-form {
    margin: 0;
    display: inline;
}

.footer-knop {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #a0aec0;
    text-decoration: none;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
}

.footer-knop:hover {
    color: white;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .edit-team-container,
    .opstellingen-container {
        grid-template-columns: 1fr;
    }
    
    .wedstrijd-title {
        flex-direction: column;
        gap: 1rem;
    }
    
    .score-display {
        flex-direction: column;
    }
}
