* {
    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-color: #f5f5f5;
    position: relative;
    min-height: 100vh;
}

#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    width: 8px;
    height: 8px;
    background: #f0f0f0;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(240, 240, 240, 0.8);
    animation: fall linear infinite;
    opacity: 0.9;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

.gluhwein-animation {
    display: inline-block;
    font-size: 2rem;
    margin-right: 0.5rem;
    animation: steam 2s ease-in-out infinite;
}

@keyframes steam {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.9;
    }
    50% {
        transform: translateY(-8px) scale(1.05);
        opacity: 1;
    }
}

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

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-container h1 {
    font-size: 1.5rem;
}

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

.nav-container a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

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

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ecf0f1;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.stat-card h3 {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.actions {
    margin-top: 2rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    transition: background-color 0.2s;
}

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

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-info {
    background-color: #16a085;
    color: white;
}

.btn-info:hover {
    background-color: #138d75;
}

.form {
    max-width: 500px;
}

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

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

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

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #7f8c8d;
    font-size: 0.875rem;
}

.message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.match-card {
    background: #ecf0f1;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #bdc3c7;
}

.match-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.match-card h3 .field-stats {
    font-size: 0.75rem;
    color: #95a5a6;
    font-weight: normal;
}

.btn-elo-gap {
    font-size: 0.7rem;
    color: #95a5a6;
    font-weight: normal;
}

.matchup-player-link {
    color: #000;
    text-decoration: none;
}

.matchup-player-link:hover {
    text-decoration: underline;
}

.teams {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.team {
    flex: 1;
}

.team h4 {
    margin-bottom: 0.5rem;
    color: #34495e;
}

.team ul {
    list-style: none;
}

.team li {
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.position {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.position-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.position-setter {
    background-color: #3498db; /* Blue */
}

.position-outside_hitter {
    background-color: #27ae60; /* Green */
}

.position-middle_blocker {
    background-color: #e74c3c; /* Red */
}

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

.player-gender-male {
    color: #3498db; /* Blue */
}

.player-gender-female {
    color: #e74c3c; /* Red */
}

.team-elo {
    color: #27ae60;
    font-size: 0.9rem;
    font-weight: 600;
}

.player-elo {
    color: #3498db;
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.elo-gap-info {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: #fff3cd;
    border-radius: 4px;
    text-align: center;
}

.elo-gap-value {
    color: #e74c3c;
    font-size: 1.1rem;
    font-weight: bold;
}

.overall-evaluation {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.overall-evaluation h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.2rem;
}

.eval-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.eval-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.eval-label {
    font-weight: 600;
    color: #495057;
}

.eval-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
}

.female-gaps {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.female-gaps-list {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.female-gap-item {
    font-size: 0.95rem;
    color: #495057;
}

.female-gap-value {
    font-weight: bold;
    font-size: 1rem;
    margin-left: 0.25rem;
}

.female-gap-value.gap-positive {
    color: #e74c3c; /* Red - Team Fenster has more females */
}

.female-gap-value.gap-negative {
    color: #3498db; /* Blue - Team Wand has more females */
}

.female-gap-value.gap-neutral {
    color: #27ae60; /* Green - Balanced */
}

.teams-tables {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.team-table-container {
    flex: 1;
}

.team-table-container h4 {
    margin-bottom: 0.5rem;
    color: #34495e;
    text-align: center;
}

.matchup-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.85rem;
}

.matchup-table thead {
    background-color: #2c3e50;
    color: white;
}

.matchup-table th,
.matchup-table td {
    padding: 0.5rem;
    text-align: left;
    border: 1px solid #ddd;
}

.matchup-table th {
    font-weight: 600;
    font-size: 0.8rem;
}

.matchup-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.matchup-table tbody tr:hover {
    background-color: #e9ecef;
}

.vs {
    font-weight: bold;
    color: #e74c3c;
    font-size: 1.2rem;
}

.match-status {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #bdc3c7;
    font-size: 0.9rem;
}

.resting-players-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
}

.resting-players-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.2rem;
}

.resting-players-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.resting-player {
    font-size: 1rem;
}

.resting-player .player-name-link {
    color: #000;
}

.resting-player-checked-out {
    opacity: 0.5;
}

.resting-player-checked-out .player-name-link {
    color: #6c757d;
    text-decoration: line-through;
}

.resting-separator {
    color: #6c757d;
}

.status-pending {
    color: #f39c12;
    font-weight: bold;
}

.status-completed {
    color: #27ae60;
    font-weight: bold;
}

.score-forms {
    display: grid;
    gap: 2rem;
}

.score-card {
    background: #ecf0f1;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #bdc3c7;
}

.score-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.teams-preview {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 4px;
}

.team-preview {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.score-form {
    margin-top: 1rem;
}

.score-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.score-input-group {
    flex: 1;
}

.score-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.score-input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1.5rem;
    text-align: center;
}

.score-separator {
    font-size: 2rem;
    font-weight: bold;
    color: #7f8c8d;
}

.form-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.standings-table thead {
    background-color: #2c3e50;
    color: white;
}

.standings-table th,
.standings-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.standings-table tbody tr:hover {
    background-color: #f5f5f5;
}

.elo-diff {
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.3rem;
}

.elo-diff-positive {
    color: #27ae60; /* Green for positive */
}

.elo-diff-negative {
    color: #e74c3c; /* Red for negative */
}

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

.standings-header,
.matchups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
    border-color: #c0392b;
}

.btn-danger:hover {
    background-color: #c0392b;
    border-color: #a93226;
}

.elo-column.hidden {
    display: none;
}

.eye-icon {
    font-size: 1rem;
    margin-right: 0.25rem;
}

.round-complete-message,
.round-status-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%;
}

.round-complete-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.round-status-message {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

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

.btn-disabled:hover {
    opacity: 0.6;
}

.player-checked-out {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.toggle-checkin {
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.status-badge.toggle-checkin:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.status-checked-in {
    background-color: #d4edda;
    color: #155724;
}

.status-checked-out {
    background-color: #f8d7da;
    color: #721c24;
}

.status-delete {
    background-color: #e74c3c;
    color: white;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.status-delete:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

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

.toggle-checkin {
    cursor: pointer;
}

.rank-value {
    display: inline-block;
    margin-right: 0.5rem;
    font-weight: bold;
}

.rank-change-header {
    text-align: center;
    width: 60px;
    min-width: 60px;
}

.rank-change-cell {
    text-align: center;
    width: 60px;
    min-width: 60px;
    padding: 0.5rem;
}

.rank-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.rank-gain {
    color: #27ae60;
}

.rank-loss {
    color: #e74c3c;
}

.rank-change .arrow {
    font-size: 1rem;
    line-height: 1;
}

.player-name-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.player-name-link:hover {
    text-decoration: underline;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.fun-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.stat-card.highlight h3 {
    color: white;
    margin-bottom: 1rem;
}

.stat-card.highlight .stat-value {
    color: white;
    font-size: 1.8rem;
}

.stat-card.highlight .stat-detail {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.rank-history-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.rank-history-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.teammates-section {
    margin-top: 2rem;
}

.teammates-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.no-stats {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.no-matches-message {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.no-matches-message p {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-container ul {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .siegquote-column {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Mobile-friendly standings table */
    .container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1rem 0.5rem;
    }
    
    .standings-table {
        font-size: 0.9rem;
        width: 100%;
    }
    
    .standings-table th,
    .standings-table td {
        padding: 0.7rem 0.5rem;
        vertical-align: middle;
    }
    
    /* Hide columns on mobile */
    .mobile-hide {
        display: none !important;
    }
    
    /* Rank change column - visible on mobile */
    .rank-change-header,
    .rank-change-cell {
        width: 50px;
        min-width: 50px;
        text-align: center;
        padding: 0.7rem 0.3rem;
    }
    
    /* Rank column */
    .rank-header,
    .rank-cell {
        width: 45px;
        text-align: center;
        padding: 0.7rem 0.3rem;
    }
    
    /* Sticky player name column */
    .player-header,
    .player-cell {
        width: 140px;
        position: sticky;
        left: 0;
        background: white;
        z-index: 2;
        padding-left: 0.8rem;
        padding-right: 0.8rem;
        box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    }
    
    .standings-table thead .player-header {
        background-color: #2c3e50;
        box-shadow: 2px 0 4px rgba(0,0,0,0.2);
    }
    
    /* Numeric columns */
    .wins-header,
    .wins-cell,
    .score-ratio-header,
    .score-ratio-cell,
    .win-rate-header,
    .win-rate-cell,
    .games-header,
    .games-cell {
        width: auto;
        min-width: 65px;
        text-align: center;
        padding: 0.7rem 0.4rem;
    }
    
    .standings-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .standings-header h2 {
        margin: 0;
        font-size: 1.5rem;
    }
    
    .player-name-link {
        font-weight: 500;
    }
}

