/* Global Styles */
body {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-size: 0.8rem;
}

.container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-top: 10px;
    margin-bottom: 20px;
}

/* Header Styles */
.header-wrapper {
    background: #2c3e50;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Card Enhancements */
.card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-title {
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* Button Styles */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #3498db;
    border: 1px solid #2980b9;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    border-color: #21618c;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    border: 1px solid #5a6268;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    border-color: #4e555b;
    transform: translateY(-1px);
}

.btn-danger {
    background: #dc3545;
    border: 1px solid #c82333;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
    transform: translateY(-1px);
}

.btn-success {
    background: #28a745;
    border: 1px solid #218838;
    color: white;
}

.btn-success:hover {
    background: #218838;
    border-color: #1e7e34;
}

.btn-outline-danger,
.btn-outline-success {
    font-weight: 600;
    background: white;
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

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

.btn-outline-success {
    color: #28a745;
    border-color: #28a745;
}

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

/* Form Controls */
.form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

textarea.form-control {
    resize: vertical;
}

/* Matches Table */
#matches {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#matches thead {
    background: #2c3e50;
    color: white;
}

#matches th {
    vertical-align: middle;
    text-align: center;
    padding: 12px 8px;
    font-weight: 600;
    border: none;
}

#matches td {
    vertical-align: middle;
    text-align: center;
    font-size: 14px;
    padding: 12px 8px;
    border-color: #f0f0f0;
}

#matches tbody tr {
    transition: background-color 0.2s ease;
}

#matches tbody tr:hover {
    background-color: #e9ecef;
}

#matches .td-action {
    width: 100px;
}

#matches .td-action button {
    margin-left: 5px;
    margin-right: 5px;
    padding: 4px 12px;
    font-size: 12px;
}

#matches .td-action button i {
    margin-right: 0 !important;
}

#matches button {
    font-size: 12px;
    text-align: center;
}

.home-away-icon {
    font-size: 18px;
}

/* Match Stats Table */
#match-stats-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

#match-stats-table th {
    text-align: center;
    vertical-align: middle;
    padding: 12px 8px;
    font-weight: 600;
}

#match-stats-table td {
    text-align: center;
    vertical-align: middle;
    padding: 10px 8px;
}

#match-stats-table .table-dark {
    background: #2c3e50;
    color: white;
}

#match-stats-table .table-info {
    --bs-table-accent-bg: #8ed1ff;
}
#match-stats-table .opp {
    --bs-table-accent-bg: #e27f7f;
}

#match-stats-table .table-secondary {
    background-color: #e9ecef;
    font-style: italic;
}

/* Score Display */
span.score-score {
    font-weight: 700;
    font-size: 2rem;
    color: #2c3e50;
    text-align: center;
}

span.score-vs {
    font-size: 1.5rem;
    margin: 0 15px;
    color: #6c757d;
    font-weight: 500;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Small screen optimizations */
@media (max-width: 576px) {
    /* Container */
    .container {
        margin-top: 5px;
        margin-bottom: 10px;
        border-radius: 8px;
        padding: 10px !important;
    }
    
    /* Matches table */
    #matches th,
    #matches td {
        padding: 8px 4px;
        font-size: 13px;
    }
    
    /* Score display */
    span.score-score {
        font-size: 1.5rem;
    }
    
    span.score-vs {
        font-size: 1.2rem;
        margin: 0 10px;
    }
    
    /* Match stats table */
    #match-stats-table th,
    #match-stats-table td {
        padding: 5px 1px;
        font-size: 11px;
    }
    
    #match-stats-table td:first-child,
    #match-stats-table th:first-child {
        font-size: 10px;
        padding-left: 4px;
        padding-right: 2px;
    }
    
    #match-stats-table .table-info td {
        font-size: 11px;
        padding: 8px 4px;
    }
    
    #match-stats-table .table-secondary td {
        font-size: 11px;
    }
    
    #match-stats-table .btn-sm {
        padding: 1px 4px;
        font-size: 11px;
        min-width: 24px;
        border-width: 1px;
    }
    
    #match-stats-table .d-flex {
        gap: 2px !important;
    }
    
    #match-stats-table .px-2 {
        padding-left: 4px !important;
        padding-right: 4px !important;
        min-width: 22px !important;
        font-size: 12px;
        font-weight: 600;
    }
    
    /* Cards */
    .card {
        border-radius: 6px;
        margin-bottom: 12px;
    }
    
    .card-body {
        padding: 10px;
    }
    
    .card-title {
        font-size: 1.1rem;
        margin-bottom: 12px !important;
    }
    
    /* Form controls */
    .form-control {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .form-label {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    /* Buttons */
    .btn {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .btn-lg {
        font-size: 15px;
        padding: 8px 16px;
    }
}

/* Password Screen Enhancement */
.password-form-wrapper {
    background: white;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.password-form-wrapper h2 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Stat Row Buttons */
#match-stats-table .btn-sm {
    padding: 0;
    font-size: 14px;
    min-width: 24px;
}

/* Button Group for Home/Away */
.btn-group .btn {
    border: 2px solid #3498db;
}

.btn-group .btn-primary {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

.btn-group .btn-outline-primary {
    background: white;
    color: #3498db;
}

.btn-group .btn-outline-primary:hover {
    background: #e3f2fd;
}

/* Form Labels */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* Result Card Styling */
.card-body h3 {
    margin-bottom: 20px;
}
