:root {
    --primary: #2e7d32;
    --primary-hover: #1b5e20;
    --primary-foreground: #ffffff;
    --secondary: #f57c00;
    --secondary-hover: #ef6c00;
    --secondary-foreground: #ffffff;
    --background: #ffffff;
    --foreground: #333333;
    --muted: #f5f5f5;
    --muted-foreground: #6c757d;
    --border: #e0e0e0;
    --card: #ffffff;
    --card-foreground: #333333;
    --destructive: #d32f2f;
    --destructive-hover: #c62828;
    --destructive-foreground: #ffffff;
    --radius: 0.5rem;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
}

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

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    text-align: center;
}

.logo-container {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--muted-foreground);
}

/* Tabs */
.tabs {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.tab-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-button {
    padding: 0.75rem;
    background-color: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tab-button.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Cards */
.card {
    background-color: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.card-header p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

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

.card-content {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

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

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

input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

input[type="range"] {
    width: 100%;
    margin: 0.5rem 0;
}

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

.rating-range {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Buttons */
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.primary-button:hover {
    background-color: var(--primary-hover);
}

.primary-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.secondary-button:hover {
    background-color: var(--secondary-hover);
}

.outline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background-color: transparent;
    color: var(--foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s;
}

.outline-button:hover {
    background-color: var(--muted);
}

.text-button {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.text-button:hover {
    text-decoration: underline;
}

.button-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.full-width {
    width: 100%;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

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

td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

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

.rating-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-weight: 500;
}

.rating-high {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.rating-medium {
    background-color: #e3f2fd;
    color: #1976d2;
}

.rating-average {
    background-color: #fff8e1;
    color: #ff8f00;
}

.rating-low {
    background-color: #ffebee;
    color: #c62828;
}

.delete-button {
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.delete-button:hover {
    background-color: var(--muted);
    color: var(--destructive);
}

.delete-button svg {
    width: 1rem;
    height: 1rem;
}

/* Teams Display */
.teams-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.team-card {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.team-card.team-a {
    border-left: 4px solid var(--primary);
}

.team-card.team-b {
    border-left: 4px solid var(--secondary);
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.team-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.team-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.team-badge.primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.team-badge.secondary {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
}

.team-stats {
    padding: 0.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.team-players {
    padding: 1rem 1.5rem;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: var(--muted);
    border-radius: var(--radius);
}

.player-name {
    font-weight: 500;
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-destructive {
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    color: var(--destructive);
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-message {
    font-size: 0.875rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    max-width: 350px;
    background-color: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    transform: translateY(150%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    border-left: 4px solid var(--primary);
}

.toast.show {
    transform: translateY(0);
}

.toast.error {
    border-left-color: var(--destructive);
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.875rem;
}

/* Player Selection */
.player-selection-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.player-checkbox-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--muted);
    border-radius: var(--radius);
    cursor: pointer;
}

.player-checkbox-item:hover {
    background-color: #eaeaea;
}

.player-checkbox-item input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.player-checkbox-label {
    flex: 1;
    font-weight: 500;
}

.player-checkbox-rating {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 500;
}

.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.selected-count {
    font-weight: 500;
}

.selection-actions {
    display: flex;
    gap: 1rem;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--card);
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: modal-appear 0.3s ease-out;
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.25rem;
    margin: 0;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted-foreground);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

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

.muted {
    color: var(--muted-foreground);
}

/* Responsive */
@media (min-width: 768px) {
    .teams-grid {
        grid-template-columns: 1fr 1fr;
    }
}