/* ===== ROOT VARIABLES ===== */
:root {
    --primary-blue: #1f91d0;
    --light-blue: #3ba5db;
    --dark-blue: #1a7eb8;
    --accent-blue: #5bb5e3;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-primary: #2c2c2c;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --error-color: #c62828;
    --success-color: #2e7d32;
    --shadow: 0 2px 8px rgba(31,145,208,0.15);
    --shadow-lg: 0 4px 16px rgba(31,145,208,0.25);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===== SCREENS ===== */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* ===== LOGIN SCREEN ===== */
#loginScreen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    padding: 20px;
}

.login-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px 30px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: block;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.login-tagline {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 8px 0 0 0;
}

.golf-icon {
    font-size: 64px;
    margin-bottom: 10px;
}

.login-header h1 {
    color: var(--primary-blue);
    font-size: 26px;
    font-weight: 700;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-tab.active {
    border-bottom-color: var(--primary-blue);
    color: var(--primary-blue);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form.hidden {
    display: none;
}

.auth-form input {
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    position: relative;
    background: var(--card-bg);
    padding: 0 15px;
    font-size: 14px;
    color: var(--text-secondary);
}

.social-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.social-btn:hover {
    background: var(--bg-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.social-btn:active {
    transform: translateY(0);
}

.social-btn svg {
    flex-shrink: 0;
}

.google-btn {
    color: var(--text-primary);
}

.apple-btn {
    background: #000;
    color: white;
    border-color: #000;
}

.apple-btn:hover {
    background: #333;
    border-color: #333;
}

/* ===== BUTTONS ===== */
.primary-btn {
    padding: 14px 24px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-btn:hover {
    background: var(--light-blue);
    transform: translateY(-1px);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn.small {
    padding: 8px 16px;
    font-size: 14px;
}

.secondary-btn {
    padding: 14px 24px;
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.secondary-btn:hover {
    background: var(--primary-blue);
    color: white;
}

.success-btn {
    padding: 14px 24px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.success-btn:hover {
    background: #1b5e20;
}

.icon-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.3s;
}

.icon-btn:hover {
    background: rgba(0,0,0,0.05);
}

/* ===== HEADER ===== */
.app-header {
    background: var(--primary-blue);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.app-header h1 {
    font-size: 18px;
    font-weight: 700;
}

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

.user-name {
    font-size: 14px;
    font-weight: 500;
}

/* ===== NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
    z-index: 99;
}

.nav-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s;
    flex: 1;
}

.nav-btn.active {
    color: var(--primary-blue);
}

.nav-icon {
    font-size: 24px;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* ===== MAIN CONTENT ===== */
.app-content {
    flex: 1;
    padding: 20px;
    padding-bottom: 90px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.view-header h2 {
    font-size: 24px;
    color: var(--primary-blue);
}

/* ===== NEWSFEED ===== */
.post-composer {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.composer-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.composer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    flex-shrink: 0;
}

.composer-input-wrapper {
    flex: 1;
}

.composer-input-wrapper textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.composer-input-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.composer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.composer-actions {
    display: flex;
    gap: 8px;
}

.composer-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: transparent;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.composer-btn:hover {
    background: var(--bg-color);
}

.photo-preview {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.photo-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.photo-preview-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.feed-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.feed-filter-tab {
    padding: 8px 20px;
    border: none;
    background: var(--card-bg);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.feed-filter-tab.active {
    background: var(--primary-blue);
    color: white;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.post-card:hover {
    box-shadow: var(--shadow-lg);
}

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

.post-author {
    display: flex;
    gap: 12px;
    align-items: center;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}

.post-author-info h4 {
    font-size: 16px;
    color: var(--primary-blue);
    margin-bottom: 2px;
}

.post-timestamp {
    font-size: 13px;
    color: var(--text-secondary);
}

.post-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: #e8f5e9;
    color: #2e7d32;
}

.post-content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 16px;
    white-space: pre-wrap;
}

.post-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 16px;
    cursor: pointer;
}

.post-footer {
    display: flex;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.post-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.post-action:hover {
    background: var(--bg-color);
}

.post-action.liked {
    color: var(--primary-blue);
}

.comments-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.comment {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    background: var(--bg-color);
    padding: 10px 12px;
    border-radius: 8px;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-blue);
    margin-bottom: 4px;
}

.comment-text {
    font-size: 14px;
    color: var(--text-primary);
}

.comment-time {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.comment-input-wrapper {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.comment-input-wrapper input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
}

.comment-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.comment-submit {
    padding: 10px 20px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.comment-submit:hover {
    background: var(--light-blue);
}

/* ===== CALENDAR ===== */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.calendar-controls h3 {
    font-size: 18px;
    color: var(--primary-blue);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 30px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    padding: 4px;
}

.calendar-day:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day.today {
    background: var(--light-blue);
    color: white;
    font-weight: 600;
}

.calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 6px;
    height: 6px;
    background: var(--accent-blue);
    border-radius: 50%;
}

.calendar-day-header {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-align: center;
}

.upcoming-events {
    margin-top: 30px;
}

.upcoming-events h3 {
    font-size: 18px;
    color: var(--primary-blue);
    margin-bottom: 16px;
}

/* ===== EVENTS ===== */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.filter-tab {
    padding: 8px 20px;
    border: none;
    background: var(--card-bg);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.filter-tab.active {
    background: var(--primary-blue);
    color: white;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.event-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 0;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.event-card-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-card-image .event-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(230, 81, 0, 0.95);
    color: white;
    backdrop-filter: blur(4px);
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 20px 20px 0 20px;
}

.event-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 4px;
}

.event-card-date {
    font-size: 14px;
    color: var(--text-secondary);
}

.event-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.event-badge.league {
    background: #fff3e0;
    color: #e65100;
}

.event-card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding: 0 20px;
}

.event-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.event-participants {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 20px 20px 20px;
    border-top: 1px solid var(--border-color);
}

.event-participants-avatars {
    display: flex;
    margin-left: auto;
}

.participant-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-left: -8px;
    border: 2px solid var(--card-bg);
}

/* ===== LEAGUE ===== */
.league-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-blue);
}

.season-filter {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text-primary);
}

.league-table {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.league-row {
    display: grid;
    grid-template-columns: 50px 1fr 80px 80px;
    gap: 12px;
    padding: 16px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.league-row:last-child {
    border-bottom: none;
}

.league-row.header {
    background: var(--bg-color);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.league-row.current-user {
    background: #e8f5e9;
}

.league-position {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-blue);
    text-align: center;
}

.league-position.top3 {
    color: var(--accent-blue);
}

.league-player {
    display: flex;
    align-items: center;
    gap: 12px;
}

.league-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

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

.league-handicap {
    font-size: 12px;
    color: var(--text-secondary);
}

.league-points {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.league-events {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== PLAYERS ===== */
.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.players-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.player-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
}

.player-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.player-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.player-card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
}

.player-card-info h3 {
    font-size: 18px;
    color: var(--primary-blue);
    margin-bottom: 4px;
}

.player-card-handicap {
    font-size: 14px;
    color: var(--text-secondary);
}

.player-card-stats {
    display: flex;
    justify-content: space-around;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

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

.player-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-blue);
}

.player-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* ===== PROFILE ===== */
.profile-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

/* Profile Photo Section */
.profile-photo-section {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.profile-photo-container {
    position: relative;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 4px solid var(--card-bg);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-initials {
    font-size: 48px;
    font-weight: 700;
    color: white;
    user-select: none;
}

.change-photo-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-blue);
    border: 3px solid var(--card-bg);
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.change-photo-btn:hover {
    background: var(--light-blue);
    transform: scale(1.1);
}

/* Profile Info Section */
.profile-info-section {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.profile-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.profile-detail:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.profile-info {
    text-align: center;
    margin-bottom: 24px;
}

.profile-info h3 {
    font-size: 24px;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.profile-info p {
    color: var(--text-secondary);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
}

.stat-item .stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.stat-item .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue);
}

/* Registered Events Section */
.financial-summary {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.financial-summary h3 {
    font-size: 18px;
    color: var(--primary-blue);
    margin-bottom: 16px;
}

.financial-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.financial-stat-item {
    text-align: center;
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
}

.financial-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.financial-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.financial-value.paid {
    color: #2e7d32;
}

.financial-value.unpaid {
    color: #ef6c00;
}

.registered-events-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.registered-events-section h3 {
    font-size: 18px;
    color: var(--primary-blue);
    margin-bottom: 16px;
}

.event-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.filter-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.filter-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

.registered-events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.registered-event-item {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid var(--primary-blue);
    transition: all 0.2s;
}

.registered-event-item:hover {
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.registered-event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.registered-event-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.payment-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.payment-badge.paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.payment-badge.unpaid {
    background: #fff3e0;
    color: #ef6c00;
}

.registered-event-details {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.registered-event-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mark-paid-btn {
    margin-top: 12px;
    width: 100%;
    padding: 8px 16px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mark-paid-btn:hover {
    background: var(--light-blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(31,145,208,0.3);
}

.mark-paid-btn:active {
    transform: translateY(0);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
}

.payment-history {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.payment-history h3 {
    font-size: 18px;
    color: var(--primary-blue);
    margin-bottom: 16px;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.payment-event {
    font-weight: 500;
}

.payment-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.payment-amount {
    font-weight: 600;
    color: var(--success-color);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s;
}

.modal-content.large {
    max-width: 700px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-header h3 {
    font-size: 20px;
    color: var(--primary-blue);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.modal-close:hover {
    background: var(--bg-color);
}

.modal-body {
    padding: 24px;
}

.modal-body label {
    display: block;
    margin-bottom: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.modal-body input,
.modal-body select,
.modal-body textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    margin-top: 6px;
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s;
    max-width: 90%;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    background: var(--error-color);
}

.toast.success {
    background: var(--success-color);
}

/* ===== ERROR MESSAGE ===== */
.error-message {
    color: var(--error-color);
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .calendar-grid {
        gap: 4px;
    }
    
    .calendar-day {
        font-size: 12px;
    }
    
    .league-row {
        grid-template-columns: 40px 1fr 60px 60px;
        gap: 8px;
        padding: 12px;
        font-size: 14px;
    }
    
    .league-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .players-list {
        grid-template-columns: 1fr;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .financial-stats {
        grid-template-columns: 1fr;
    }
    
    .event-filters {
        flex-wrap: wrap;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 80px;
    }
    
    .registered-event-details {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .app-header h1 {
        font-size: 16px;
    }
    
    .user-name {
        display: none;
    }
    
    .view-header h2 {
        font-size: 20px;
    }
    
    .nav-label {
        font-size: 10px;
    }
    
    .nav-icon {
        font-size: 20px;
    }
    
    .social-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .auth-divider {
        margin: 15px 0;
        font-size: 13px;
    }
    
    .login-container {
        padding: 30px 20px;
    }
}
