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

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.screen {
    min-height: 100vh;
}

/* Login Screen */
#loginScreen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.login-container h1 {
    font-size: 36px;
    margin-bottom: 10px;
    color: #667eea;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
}

.login-container input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
}

.login-container input:focus {
    outline: none;
    border-color: #667eea;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.login-container button:hover {
    background: #5568d3;
}

/* Header */
header {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.season-badge {
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
}

.user-name {
    font-weight: 600;
    color: #667eea;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    border-top: 1px solid #f0f0f0;
}

.nav-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: #f5f5f5;
}

.nav-btn.active {
    background: #e8eaf6;
    color: #667eea;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.view-header h2 {
    font-size: 28px;
    color: #333;
}

/* Buttons */
.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-danger {
    background: #ef5350;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #e53935;
}

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

.card h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

/* Event Card */
.event-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 20px;
}

.event-card.event-today {
    border: 2px solid #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.event-info h3 {
    font-size: 22px;
    margin-bottom: 5px;
}

.event-info .event-meta {
    color: #888;
    font-size: 13px;
    margin-bottom: 5px;
}

.event-info .bet-count {
    font-size: 13px;
    color: #999;
}

.event-info .actual-arrival {
    margin-top: 10px;
    font-weight: 600;
    color: #667eea;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-open {
    background: #c8e6c9;
    color: #2e7d32;
}

.status-closed {
    background: #e0e0e0;
    color: #666;
}

.bet-form,
.close-form {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.bet-form input,
.close-form input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
}

.user-bet {
    background: #e8eaf6;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    color: #667eea;
    font-weight: 600;
}

.results {
    margin-top: 15px;
}

.results h4 {
    margin-bottom: 10px;
    color: #666;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 8px;
}

.result-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank {
    font-weight: bold;
    font-size: 18px;
    color: #666;
}

.points-badge {
    background: #e8eaf6;
    color: #667eea;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* Leaderboard */
.leaderboard-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.leaderboard-header h2 {
    font-size: 28px;
}

.season-select {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    cursor: pointer;
    color: #333;
}

.season-select:focus {
    outline: none;
    border-color: #667eea;
}

.leaderboard-info {
    background: linear-gradient(135deg, #ffd54f 0%, #ff9800 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.leaderboard-info h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-item.current-user {
    background: #e8eaf6;
}

.leaderboard-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.position {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.position-1 {
    background: #ffd700;
    color: white;
}
.position-2 {
    background: #c0c0c0;
    color: #333;
}
.position-3 {
    background: #cd7f32;
    color: white;
}
.position-other {
    background: #f0f0f0;
    color: #666;
}

.player-name {
    font-weight: 600;
    font-size: 18px;
}

.you-badge {
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
}

.leaderboard-right {
    text-align: right;
}

.points {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
}

.points-label {
    font-size: 13px;
    color: #999;
}

.info-card {
    background: #e8eaf6;
    border-left: 4px solid #667eea;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    color: #333;
}

.croissant-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ffb74d;
}

.croissant-card.croissant-me {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #e57373;
}

.croissant-icon {
    font-size: 48px;
}

.croissant-text h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #e65100;
}

.croissant-me .croissant-text h4 {
    color: #c62828;
}

.croissant-text p {
    margin: 0;
    color: #666;
}
