/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #10B981;
    --primary-dark: #059669;
    --secondary: #3B82F6;
    --danger: #EF4444;
    --warning: #F59E0B;
    --success: #10B981;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    /* iOS fixes */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-text-size-adjust: 100%;
}

/* Fix date inputs on iOS to match select height */
input[type="date"],
input[type="time"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 44px;
}

/* Ensure all form inputs in booking grid are same height */
#mainBookingStep1 input,
#mainBookingStep1 select {
    height: 44px;
    min-height: 44px;
}

/* Weekly booking form inputs */
#addWeeklyBookingForm input,
#addWeeklyBookingForm select {
    height: 44px !important;
    min-height: 44px !important;
}

.hidden {
    display: none !important;
}

/* Screens */
.screen {
    min-height: 100vh;
    width: 100%;
}

/* Login Screen */
.login-container {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* PWA standalone mode fixes */
@supports (padding-top: env(safe-area-inset-top)) {
    .login-container {
        padding-top: calc(60px + env(safe-area-inset-top));
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }
}

.logo {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin-bottom: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.login-container h1 {
    color: white;
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 8px;
    text-align: center;
}

.tagline {
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    margin-bottom: 32px;
    text-align: center;
}

.login-options {
    width: 100%;
    max-width: 400px;
}

.welcome-options {
    width: 100%;
    max-width: 400px;
    margin-bottom: 24px;
}

.login-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    margin: 20px 0;
    width: 100%;
    max-width: 400px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.3);
    margin: 0 12px;
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.5);
    color: white;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

.import-section {
    margin-top: 32px;
    text-align: center;
}

.import-label {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    margin-bottom: 12px;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* iOS fix */
    -webkit-appearance: none;
    touch-action: manipulation;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-500);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

/* Eagle-only buttons - greyed out for non-eagles */
.eagle-only.eagle-locked {
    background: var(--gray-300) !important;
    color: var(--gray-500) !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.eagle-only.eagle-locked:hover {
    transform: none;
    box-shadow: none;
}

.btn-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    font-weight: 700;
    padding: 16px 32px;
    font-size: 16px;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.btn-small {
    padding: 10px 16px;
    font-size: 14px;
    width: auto;
}

.btn-icon {
    font-size: 20px;
}

.btn-icon-only {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 24px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back {
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    margin-right: 16px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 16px;
}

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

.header-left {
    flex: 1;
}

.header-title {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 4px;
}

.header-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.tabs {
    display: flex;
    gap: 6px;
    width: 100%;
}

.tab {
    flex: 1;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 10px 8px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    text-align: center;
}

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

/* Content */
.content {
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.tab-content {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.card-title {
    font-size: 18px;
    font-weight: 700;
}

.card-subtitle {
    color: var(--gray-500);
    font-size: 14px;
    margin-top: 4px;
}

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

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

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

/* List Items */
.list-item {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.list-item:hover {
    background: var(--gray-100);
    transform: translateX(4px);
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.list-item-subtitle {
    font-size: 14px;
    color: var(--gray-500);
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

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

.badge-warning {
    background: #FED7AA;
    color: #7C2D12;
}

.badge-success {
    background: #86EFAC;
    color: #14532D;
}

.badge-gray {
    background: var(--gray-200);
    color: var(--gray-700);
}

.hole-result {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.hole-result.won {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.hole-result.lost {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.hole-result.halved {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.stableford-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-help {
    margin-top: 8px;
    font-size: 14px;
    color: var(--gray-500);
}

.form-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid var(--gray-200);
}

.form-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

/* Holes Grid */
.holes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.holes-column h4 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--gray-700);
}

.hole-input-row {
    display: grid;
    grid-template-columns: 40px 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
}

.hole-number {
    font-weight: 700;
    color: var(--gray-700);
    text-align: center;
}

.hole-input-row input {
    padding: 8px;
    border: 2px solid var(--gray-200);
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

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

/* Player Selection */
.player-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.player-card {
    padding: 16px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.player-card:hover {
    border-color: var(--primary);
    background: #D1FAE5;
}

.player-card.selected {
    border-color: var(--primary);
    background: #D1FAE5;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.player-card-name {
    font-weight: 700;
    margin-bottom: 4px;
}

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

/* Pairs/Teams */
.pairs-container {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.pair-box {
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px;
    background: var(--gray-50);
}

.pair-box h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--gray-700);
}

.pair-box.team-1 {
    border-color: var(--secondary);
    background: #EFF6FF;
}

.pair-box.team-2 {
    border-color: var(--danger);
    background: #FEE2E2;
}

.player-chip {
    display: inline-block;
    padding: 8px 14px;
    margin: 4px;
    border-radius: 8px;
    background: white;
    border: 2px solid var(--gray-300);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.player-chip:hover {
    transform: scale(1.05);
}

.player-chip.in-pair {
    background: #DBEAFE;
    border-color: var(--secondary);
    color: #1E3A8A;
}

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

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

.hole-number-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
}

.hole-info {
    flex: 1;
    margin-left: 16px;
}

.hole-title {
    font-weight: 700;
    font-size: 16px;
}

.hole-details {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.si-badge {
    background: #FEF3C7;
    color: #92400E;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
}

.hole-body {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--gray-200);
}

.player-score-entry {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.player-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.player-name {
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.player-info {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.score-display {
    text-align: right;
}

.score-value {
    font-size: 36px;
    font-weight: 900;
    padding: 10px 20px;
    border-radius: 8px;
    min-width: 60px;
    text-align: center;
}

.score-eagle { background: #FDE047; color: #713F12; }
.score-birdie { background: #86EFAC; color: #14532D; }
.score-par { background: #DBEAFE; color: #1E3A8A; }
.score-bogey { background: #FED7AA; color: #7C2D12; }
.score-double { background: #FECACA; color: #7F1D1D; }

.nett-score {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Score Input Row */
.score-input-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.score-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.score-input-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
    min-width: 50px;
}

.score-adjuster {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-adj-btn {
    width: 56px;
    height: 56px;
    border: 2px solid var(--primary);
    background: white;
    border-radius: 8px;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-adj-btn:hover {
    background: var(--primary);
    color: white;
}

.score-adj-btn:active {
    transform: scale(0.95);
}

.score-input-box {
    width: 80px;
    height: 56px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    transition: all 0.2s;
}

.score-input-box:focus {
    outline: none;
    border-color: var(--primary);
    background: #D1FAE5;
}

.score-input-box::placeholder {
    color: var(--gray-400);
    font-weight: 600;
}

/* Remove spinner */
.score-input-box::-webkit-inner-spin-button,
.score-input-box::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.score-input-box[type=number] {
    -moz-appearance: textfield;
}

/* Extras Group */
.extras-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.penalty-input {
    flex: 1;
    min-width: 180px;
    padding: 8px 12px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
}

.penalty-input:focus {
    outline: none;
    border-color: var(--warning);
}

.penalty-input::placeholder {
    color: var(--gray-400);
    font-size: 13px;
}

/* Match Status */
.match-status {
    background: var(--gray-100);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.match-status h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.match-score {
    display: flex;
    justify-content: space-around;
    margin-bottom: 16px;
}

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

.team-name {
    font-weight: 700;
    margin-bottom: 8px;
}

.team-score {
    font-size: 36px;
    font-weight: 900;
}

.match-result {
    font-size: 20px;
    font-weight: 700;
    padding: 12px;
    border-radius: 8px;
    background: white;
}

.match-status.team-1-winning {
    background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
}

.match-status.team-2-winning {
    background: linear-gradient(135deg, #FEE2E2, #FECACA);
}

/* Results */
.results-section {
    margin-bottom: 32px;
}

.results-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.leaderboard {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

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

.leaderboard-row.header {
    background: var(--gray-100);
    font-weight: 700;
    font-size: 14px;
    color: var(--gray-900);
}

.leaderboard-position {
    text-align: center;
    font-weight: 900;
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.leaderboard-position.first { 
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1F2937;
    box-shadow: 0 4px 6px rgba(255, 215, 0, 0.3);
}

.leaderboard-position.second { 
    background: linear-gradient(135deg, #E5E7EB 0%, #9CA3AF 100%);
    color: #1F2937;
    box-shadow: 0 4px 6px rgba(156, 163, 175, 0.3);
}

.leaderboard-position.third { 
    background: linear-gradient(135deg, #CD7F32 0%, #8B5A3C 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(205, 127, 50, 0.3);
}

.leaderboard-name {
    font-weight: 700;
}

.leaderboard-score {
    font-weight: 900;
    font-size: 20px;
}

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

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-large {
    max-width: 800px;
}

.modal-menu {
    max-width: 320px;
}

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

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--gray-500);
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--gray-50);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
    text-align: left;
}

.menu-item:hover {
    background: var(--gray-100);
}

.menu-item-danger {
    color: var(--danger);
}

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

/* Responsive */
@media (max-width: 768px) {
    /* Mobile logo fixes - keep trophy and flag centered side by side */
    .logo {
        width: 90px;
        height: 90px;
        font-size: 36px;
        line-height: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 2px;
        margin: 0 auto 24px;
    }
    
    .login-container {
        padding: 24px 16px;
    }
    
    .login-container h1 {
        font-size: 28px;
    }
    
    .tagline {
        font-size: 14px;
    }
    
    .holes-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .score-input-row {
        gap: 8px;
    }
    
    .score-adj-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .score-input-box {
        width: 60px;
        height: 40px;
        font-size: 18px;
    }
    
    .extras-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .penalty-input {
        width: 100%;
        min-width: 0;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-900);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 2000;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

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

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

/* Tee Management Styles */
.tees-list {
    margin-bottom: 20px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
    min-height: 60px;
}

.tee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    margin-bottom: 8px;
}

.tee-item:last-child {
    margin-bottom: 0;
}

.tee-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tee-details {
    font-size: 12px;
    color: var(--gray-600);
}

.tee-form {
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-top: 16px;
}

/* Tee Assignment Styles */
.tee-assignment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    margin-bottom: 8px;
}

.tee-assignment-player {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-handicap {
    font-size: 12px;
    color: var(--gray-600);
}

.tee-select {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
    background: white;
}

.tee-select:focus {
    outline: none;
    border-color: var(--primary);
}

.text-warning {
    color: var(--warning);
}

/* Apply same tee to all */
.apply-all-tee {
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 16px;
}

.apply-all-tee label {
    display: block;
    margin-bottom: 8px;
}

.apply-all-tee .tee-select {
    width: 100%;
}

/* Tee badges on course cards */
.tee-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 4px;
    margin-bottom: 4px;
}

/* Mobile adjustments for tee management */
@media (max-width: 768px) {
    .tee-assignment-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .tee-select {
        width: 100%;
    }
    
    .tee-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
}

/* Login Form Styles */
.login-form {
    width: 100%;
    max-width: 400px;
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form label {
    display: block;
    color: var(--gray-700);
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

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

.login-form .btn-block {
    margin-top: 8px;
}

.login-help {
    margin-top: 24px;
    text-align: center;
}

.login-help p {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

.login-help a {
    color: white;
    font-weight: 600;
}

/* Read-only score entry */
.player-score-entry.read-only {
    opacity: 0.8;
}

.player-score-entry.read-only .player-score-header {
    border-bottom: none;
}

.score-readonly {
    padding: 8px 12px;
    color: var(--gray-500);
    font-size: 14px;
}

/* Admin-only elements */
.admin-only {
    /* Will be hidden via JS for non-admins */
}

/* Small icon button for remove actions */
.btn-icon-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: var(--gray-200);
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-icon-small:hover {
    background: var(--danger);
    color: white;
}

/* Locked handicap indicator */
.handicap-locked {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #FEF3C7;
    color: #92400E;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Skins winner highlight */
.skin-winner {
    background: #ECFDF5;
    border-left: 3px solid #10B981;
}

/* ===== MY SCORE TAB STYLES ===== */

.my-score-container {
    padding: 8px 0;
}

.player-scorecard {
    margin-bottom: 20px;
}

.player-scorecard-header {
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px 12px 0 0;
    color: white;
}

.player-name-large {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}

.player-hcp-info {
    font-size: 13px;
    opacity: 0.9;
}

.score-summary {
    display: flex;
    justify-content: space-around;
    padding: 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.score-summary-item {
    text-align: center;
}

.score-summary-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gray-500);
    font-weight: 600;
    margin-bottom: 4px;
}

.score-summary-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--gray-800);
}

.score-summary-value.points {
    color: var(--primary);
}

.hole-by-hole-table {
    overflow-x: auto;
}

.hole-by-hole-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.hole-by-hole-table th,
.hole-by-hole-table td {
    padding: 8px 6px;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.hole-by-hole-table th {
    background: var(--gray-100);
    font-weight: 700;
    color: var(--gray-700);
    font-size: 11px;
    text-transform: uppercase;
}

.hole-by-hole-table .hole-num {
    font-weight: 700;
    color: var(--gray-800);
}

.hole-by-hole-table .score-cell {
    font-weight: 700;
}

.hole-by-hole-table .points-cell {
    font-weight: 700;
    color: var(--primary);
}

.hole-by-hole-table tr.score-eagle .score-cell {
    background: #FEF3C7;
    color: #B45309;
}

.hole-by-hole-table tr.score-birdie .score-cell {
    background: #DCFCE7;
    color: #166534;
}

.hole-by-hole-table tr.score-par .score-cell {
    background: var(--gray-100);
}

.hole-by-hole-table tr.score-bogey .score-cell {
    background: #FEE2E2;
    color: #991B1B;
}

.hole-by-hole-table tr.score-double .score-cell {
    background: #991B1B;
    color: white;
}

.hole-by-hole-table .subtotal-row {
    background: var(--gray-100);
}

.hole-by-hole-table .total-row {
    background: var(--gray-800);
    color: white;
}

.hole-by-hole-table .total-row .points-cell {
    color: #60A5FA;
}

/* ===== SNAKE ANIMATION STYLES ===== */

.snake-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.snake-wrapper {
    position: absolute;
    left: -300px;
    width: 280px;
    height: 80px;
    animation: snakeSlither 3.5s ease-in-out forwards;
}

.cartoon-snake {
    width: 100%;
    height: 100%;
    filter: drop-shadow(3px 3px 5px rgba(0,0,0,0.4));
    animation: snakeWiggle 0.15s ease-in-out infinite alternate;
}

@keyframes snakeWiggle {
    0% { transform: translateY(-3px) scaleY(0.97); }
    100% { transform: translateY(3px) scaleY(1.03); }
}

@keyframes snakeSlither {
    0% {
        left: -300px;
    }
    100% {
        left: calc(100% + 50px);
    }
}

/* ===== BIRDIE POPUP STYLES ===== */

.birdie-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    -webkit-transform: translate(-50%, -50%) scale(0);
    text-align: center;
    animation: birdiePopIn 2.5s ease-out forwards;
    -webkit-animation: birdiePopIn 2.5s ease-out forwards;
    z-index: 10000;
}

.birdie-emoji {
    font-size: 100px;
    animation: birdieWiggle 0.3s ease-in-out infinite alternate;
    -webkit-animation: birdieWiggle 0.3s ease-in-out infinite alternate;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    -webkit-filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.birdie-text {
    font-size: 32px;
    font-weight: 800;
    color: #EAB308;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3), -1px -1px 0 #fff;
    margin-top: 8px;
    letter-spacing: 4px;
}

@-webkit-keyframes birdiePopIn {
    0% {
        -webkit-transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    15% {
        -webkit-transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    25% {
        -webkit-transform: translate(-50%, -50%) scale(1);
    }
    75% {
        -webkit-transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        -webkit-transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
}

@keyframes birdiePopIn {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    15% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    25% {
        transform: translate(-50%, -50%) scale(1);
    }
    75% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
}

@-webkit-keyframes birdieWiggle {
    0% { -webkit-transform: rotate(-5deg); }
    100% { -webkit-transform: rotate(5deg); }
}

@keyframes birdieWiggle {
    0% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg); }
}

/* ===== SNAKE HOLDER SECTION STYLES ===== */

.snake-card {
    overflow: hidden;
}

.snake-holder-display {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, #065F46 0%, #047857 50%, #059669 100%);
    border-radius: 12px;
}

.snake-holder-display.no-snake {
    background: linear-gradient(135deg, var(--gray-400) 0%, var(--gray-500) 100%);
}

.snake-emoji {
    font-size: 64px;
    margin-bottom: 12px;
    animation: snakeWiggle 2s ease-in-out infinite;
}

.snake-emoji.faded {
    opacity: 0.5;
    animation: none;
}

@keyframes snakeWiggle {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

.snake-holder-name {
    font-size: 28px;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 8px;
}

.snake-holder-info {
    font-size: 16px;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    margin-bottom: 12px;
}

.snake-note {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    font-style: italic;
}

/* ===== COMPLETED ROUND STYLES ===== */

.round-completed-banner {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 16px;
    font-weight: 600;
}

.player-score-entry.read-only {
    opacity: 0.85;
    background: var(--gray-50);
}

/* ===== COMPETITION TABS ===== */

.comp-tabs {
    display: flex;
    gap: 3px;
    padding: 8px 8px;
}

.comp-tabs .tab {
    flex: 1;
    padding: 12px 4px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.comp-tabs .tab:hover {
    background: rgba(255, 255, 255, 0.3);
}

.comp-tabs .tab.active {
    background: white;
    color: var(--primary);
}

/* ===== SCORES TAB STYLES ===== */

.scores-container {
    padding: 8px 0;
}

.scores-group {
    margin-bottom: 16px;
}

.scores-group-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px 12px 0 0;
    color: white;
    font-size: 18px;
    font-weight: 800;
}

.scores-table {
    padding: 8px;
}

.scores-header-row {
    display: grid;
    grid-template-columns: 1fr 48px 48px 48px 60px;
    gap: 4px;
    padding: 8px 6px;
    background: var(--gray-100);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
}

.scores-player-row {
    display: grid;
    grid-template-columns: 1fr 48px 48px 48px 60px;
    gap: 4px;
    padding: 12px 6px;
    align-items: center;
    border-bottom: 1px solid var(--gray-100);
}

.scores-col-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scores-col {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-700);
}

.scores-col-pts {
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
}

.scores-points-detail {
    padding: 6px 6px 12px 6px;
    font-size: 13px;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-200);
}

/* Snake and Penalties sections in Scores tab */
.snake-section,
.penalties-section {
    margin-top: 16px;
}

.snake-section-header,
.penalties-section-header {
    padding: 12px 16px;
    background: var(--gray-800);
    color: white;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px 12px 0 0;
}

.snake-section-content {
    padding: 16px;
    text-align: center;
}

.snake-holder-info {
    font-size: 16px;
    color: var(--gray-800);
}

.snake-holder-info strong {
    color: var(--danger);
    font-size: 18px;
}

.snake-hole {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

.no-snake {
    color: var(--gray-500);
    font-style: italic;
}

.penalties-list {
    padding: 12px 16px;
}

.penalty-item {
    padding: 10px 12px;
    background: #FEF3C7;
    border-left: 3px solid var(--warning);
    border-radius: 0 8px 8px 0;
    margin-bottom: 8px;
    font-size: 14px;
}

.penalty-item:last-child {
    margin-bottom: 0;
}

.penalty-item strong {
    color: var(--gray-800);
}

.progress-info {
    margin-top: 16px;
    padding: 16px;
}

.progress-header {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.progress-detail {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.progress-bar-container {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success) 0%, #34D399 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ===== LOCKED HOLE STYLES ===== */

.hole-card.hole-locked {
    opacity: 0.6;
}

.hole-card.hole-locked .hole-header {
    cursor: not-allowed;
    background: var(--gray-100);
}

.hole-card.hole-locked .hole-number-badge {
    background: var(--gray-400);
    font-size: 16px;
}

.hole-card.hole-locked .hole-details {
    color: var(--gray-400);
    font-style: italic;
}

.hole-card.hole-scored .hole-number-badge {
    background: var(--success);
}

.hole-number-badge.locked {
    background: var(--gray-400) !important;
}

/* ===== TEAM ASSIGNMENT STYLES ===== */

.team-names-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.team-toggle {
    display: flex;
    gap: 4px;
}

.team-btn {
    padding: 6px 12px;
    border: 2px solid var(--gray-300);
    background: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.team-btn:hover {
    border-color: var(--gray-400);
}

.team-btn.active.team-a {
    background: #3B82F6;
    border-color: #3B82F6;
    color: white;
}

.team-btn.active.team-b {
    background: #EF4444;
    border-color: #EF4444;
    color: white;
}

/* ===== OVERALL STANDINGS STYLES ===== */

.overall-standings {
    text-align: center;
    padding: 0 !important;
    overflow: hidden;
}

.overall-header {
    padding: 16px;
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
    color: white;
    font-size: 20px;
    font-weight: 800;
}

.team-a-leading .overall-header {
    background: linear-gradient(135deg, #1D4ED8 0%, #3B82F6 100%);
}

.team-b-leading .overall-header {
    background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%);
}

.all-square .overall-header {
    background: linear-gradient(135deg, #065F46 0%, #059669 100%);
}

.team-scores-row {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 20px;
}

.team-score {
    flex: 1;
    max-width: 140px;
}

.team-score .team-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.team-score .team-points {
    font-size: 48px;
    font-weight: 900;
}

.team-score.team-a .team-points {
    color: #3B82F6;
}

.team-score.team-b .team-points {
    color: #EF4444;
}

.team-divider {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-400);
}

/* Match Result Cards */

.match-result-card {
    margin-bottom: 12px;
    padding: 16px;
    border-left: 4px solid var(--gray-300);
}

.match-result-card.team-a {
    border-left-color: #3B82F6;
}

.match-result-card.team-b {
    border-left-color: #EF4444;
}

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

.match-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
}

.match-team-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    background: var(--gray-200);
    color: var(--gray-600);
}

.match-team-badge.team-a {
    background: #DBEAFE;
    color: #1D4ED8;
}

.match-team-badge.team-b {
    background: #FEE2E2;
    color: #DC2626;
}

.match-players {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.match-status {
    font-size: 18px;
    font-weight: 700;
}

.match-status.complete {
    color: var(--success);
}

.match-status.in-progress {
    color: var(--primary);
}

.match-status.not-started {
    color: var(--gray-400);
}

.match-points {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}


/* ===== OVERALL COMPETITION STYLES ===== */

.overall-standings {
    padding: 20px;
}

.team-standings {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.team-score-box {
    flex: 1;
    max-width: 140px;
    padding: 20px 16px;
    border-radius: 12px;
    text-align: center;
    color: white;
}

.team-score-box.winning {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.team-score-box.losing {
    opacity: 0.7;
}

.team-name-display {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-points-display {
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
}

.vs-divider {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
}

.overall-status {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-700);
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.match-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.match-result-card {
    padding: 16px;
}

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

.match-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-700);
}

.match-status {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
}

.match-status.team-a-win {
    background: #DBEAFE;
    color: #1D4ED8;
}

.match-status.team-b-win {
    background: #FEE2E2;
    color: #DC2626;
}

.match-status.halved {
    background: var(--gray-100);
    color: var(--gray-600);
}

.match-teams {
    display: flex;
    align-items: center;
    gap: 12px;
}

.match-team {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    background: var(--gray-50);
}

.match-team.team-a {
    border-left: 3px solid #3B82F6;
}

.match-team.team-b {
    border-left: 3px solid #EF4444;
}

.match-team-players {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.match-team-score {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

.match-vs {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
}

/* Team toggle buttons in setup */
.team-toggle {
    display: flex;
    gap: 8px;
}

.team-btn {
    padding: 8px 12px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    background: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.team-btn:hover {
    border-color: var(--gray-400);
}

.team-btn.active.team-a {
    background: #3B82F6;
    border-color: #3B82F6;
    color: white;
}

.team-btn.active.team-b {
    background: #EF4444;
    border-color: #EF4444;
    color: white;
}

.team-names-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}



/* ===== DAY SELECTOR STYLES ===== */

.day-selector-container {
    padding: 8px 16px;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

.day-selector {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.day-selector::-webkit-scrollbar {
    display: none;
}

.day-btn {
    flex-shrink: 0;
    padding: 10px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    background: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-width: 80px;
}

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

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

.day-btn.completed {
    background: #D1FAE5;
    border-color: #10B981;
    color: #059669;
}

.day-btn.completed.active {
    background: #10B981;
    color: white;
}

.day-btn .day-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.day-btn .day-format {
    display: block;
    font-size: 10px;
    opacity: 0.8;
    margin-top: 2px;
}

.day-btn .day-course {
    display: block;
    font-size: 9px;
    opacity: 0.7;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}



/* ===== ROUND SETUP TABS ===== */

.round-setup-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.round-setup-tab {
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    min-width: 120px;
}

.round-setup-tab:hover {
    border-color: var(--primary);
}

.round-setup-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.round-tab-day {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.round-tab-info {
    display: block;
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
}



/* ===== DAY SUMMARY BADGE ===== */

.day-summary-badge {
    padding: 6px 12px;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
}


/* Course Search Styles */
.course-search-container {
    position: relative;
}

.course-search-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
}

.course-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.course-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
}

.course-search-hint {
    padding: 12px 16px;
    color: var(--gray-500);
    font-size: 13px;
}

.course-search-result {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s;
}

.course-search-result:last-child {
    border-bottom: none;
}

.course-search-result:hover {
    background: var(--gray-50);
}

.course-result-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 14px;
}

.course-result-region {
    color: var(--gray-500);
    font-size: 12px;
    margin-top: 2px;
}

.course-config-header {
    padding: 12px 16px;
    font-weight: 700;
    color: var(--primary);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.course-config-hint {
    padding: 8px 16px;
    color: var(--gray-500);
    font-size: 12px;
    background: var(--gray-50);
}

/* Course Preview Card */
.course-preview-card {
    margin-bottom: 16px;
}

.course-preview-body {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.course-preview-body h4 {
    margin: 0 0 12px 0;
    color: var(--gray-700);
}

.course-preview-actions {
    padding: 16px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.course-action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.course-already-added {
    color: var(--success);
    font-weight: 600;
    padding: 8px 0;
}

/* Tee Category Display */
.tee-category {
    margin-bottom: 16px;
}

.tee-category-header {
    font-weight: 600;
    color: var(--primary);
    padding: 8px 0;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.tee-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}

.tee-name-badge {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 13px;
    min-width: 60px;
    text-align: center;
}

.tee-details {
    color: var(--gray-600);
    font-size: 13px;
}

/* Disabled button styling */
button.disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Clear Score Button */
.btn-clear-score {
    background: #FEE2E2;
    color: #B91C1C;
    border: 1px solid #FECACA;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.btn-clear-score:hover {
    background: #FECACA;
    border-color: #F87171;
}

.btn-clear-score:active {
    background: #F87171;
    color: white;
}

/* Score input group with clear button */
.score-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Invite Card */
.invite-card {
    border: none !important;
}

.invite-card .btn-secondary {
    background: white;
    color: #059669;
    font-weight: 600;
}

.invite-card .btn-secondary:hover {
    background: #F0FDF4;
}

/* Round card form field responsive styles */
@media (max-width: 400px) {
    .round-card > div:last-child {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

/* Season Competitions & Tee Bookings */
.player-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 4px;
}

.player-selector-grid label {
    transition: background 0.15s ease;
}

.player-selector-grid label:hover {
    background: #E5E7EB;
}

.player-selector-grid input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: var(--primary-dark);
}

/* Leaderboard position badges */
.leaderboard-position.first {
    background: #FEF3C7;
    color: #92400E;
    font-weight: 700;
}

.leaderboard-position.second {
    background: #E5E7EB;
    color: #374151;
    font-weight: 600;
}

.leaderboard-position.third {
    background: #FED7AA;
    color: #9A3412;
    font-weight: 600;
}
