* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content h1 {
    font-size: 1.5rem;
    color: #333;
}

.subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Main */
main {
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card h2 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

/* Form */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Initials List */
#initialsList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.initial-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.initial-item.player {
    border-left-color: #28a745;
}

.initial-info {
    flex: 1;
}

.initial-name {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.initial-details {
    color: #666;
    font-size: 0.85rem;
    margin-top: 4px;
}

.initial-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 8px;
}

.initial-type-badge.tennis {
    background: #e8eaf6;
    color: #667eea;
}

.initial-type-badge.player {
    background: #e8f5e9;
    color: #28a745;
}

.initial-actions {
    display: flex;
    gap: 8px;
}

/* Stats Section */
#currentStats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.stat-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-card.tennis {
    border-top: 3px solid #667eea;
}

.stat-card.player {
    border-top: 3px solid #28a745;
}

.stat-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.stat-total {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

.stat-card.player .stat-total {
    color: #28a745;
}

.stat-breakdown {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 30px;
    color: #666;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
}

.modal-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-actions {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .form-row {
        flex-direction: column;
    }

    main {
        padding: 15px;
    }

    .initial-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .initial-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
