/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Disable zoom on double-tap */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Force page to start at top */
html {
    scroll-behavior: auto;
    overflow-x: hidden;
}

html, body {
    position: relative;
    top: 0;
    left: 0;
}

body {
    font-family: 'Roboto Slab', serif;
    background: linear-gradient(
        135deg,
        rgba(34, 139, 34, 0.9) 0%,
        rgba(0, 100, 0, 0.8) 50%,
        rgba(25, 111, 61, 0.9) 100%
    ),
    url('https://pixabay.com/get/gc6a0978fa622b5f35e37251e176b20b884a46a8aac5cb5fa714d6068f44c27da78f3dc5b0acc702a89936605285321c3055cc7db618a7268ab9721ed5bca94d6_1280.jpg') center/cover no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    color: #2c5530;
    overflow-x: hidden;
    /* Ensure page always starts at top */
    scroll-behavior: auto;
    /* Primary zoom prevention */
    touch-action: manipulation !important;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Enhanced mobile performance */
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
}

/* Game Container */
.game-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Universal Section Box - Forces all elements to same width */
.section-box,
.game-header,
.course-info,
.scoreboard,
.web-keyboard,
.control-box,
.game-status,
.interface-options,
.mobile-keyboard {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

/* ParWords UI Container - Unified box container */
.parwords-ui-container {
    width: 100%;
    margin: 0;
    padding: 0;
}

.box {
    width: 100%;
    margin: 0.75rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    border: 2px solid #228b22;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    backdrop-filter: blur(10px);
}

/* Prevent input focus from causing scroll */
.input-section input:focus {
    scroll-margin: 0;
}

/* Interface Options Styles */
.interface-options {
    margin: 15px 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #228b22;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    box-sizing: border-box;
}

.options-header {
    font-weight: bold;
    color: #2c5530;
    margin-bottom: 12px;
    text-align: center;
    font-size: 1.1rem;
}

.options-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.option-label {
    font-weight: 500;
    color: #2c5530;
    font-size: 0.95rem;
}

.mobile-keyboard {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    border: 2px solid #228b22;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 100%;
    box-sizing: border-box;
}

.mobile-keyboard-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.current-guess {
    font-family: 'Roboto Slab', serif;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.2em;
    color: #2c5530;
    min-width: 180px;
    text-align: center;
}

.clear-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background: #ff3742;
    transform: translateY(-1px);
}

.mobile-keyboard-keys {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-keyboard-row {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.mobile-key {
    background: #228b22;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-family: 'Roboto Slab', serif;
    font-weight: bold;
    font-size: 16px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation !important;
    min-width: 36px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mobile-key:hover {
    background: #1e7e1e;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.mobile-key:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mobile-key.wide-key {
    min-width: 60px;
    padding: 12px 16px;
}

.mobile-key.submit-key {
    background: #ff6b35;
    font-size: 16px !important;
}

.mobile-key.submit-key:hover {
    background: #ff5722;
}

.mobile-key.backspace-key {
    background: #6c757d;
    /* Extra anti-zoom protection for delete button */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.mobile-key.backspace-key:hover {
    background: #5a6268;
}

.mobile-key.disabled {
    background: #6c757d;
    opacity: 0.5;
    cursor: not-allowed;
}

.mobile-key.disabled:hover {
    background: #6c757d;
    transform: none;
}

/* Mobile responsive adjustments */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    .interface-options {
        background: rgba(255, 255, 255, 0.95) !important;
        padding: 15px !important;
        border-radius: 12px !important;
        border: 2px solid #228b22 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
        display: block !important;
        visibility: visible !important;
        position: relative !important;
        z-index: 1000 !important;
    }
    
    .option-row {
        padding: 10px 0;
    }
    
    .option-label {
        font-size: 0.9rem;
    }
    
    .mobile-key {
        min-width: 32px;
        min-height: 44px;
        padding: 10px;
        font-size: 16px !important;
    }
    
    .mobile-key.wide-key {
        min-width: 55px;
        padding: 10px 14px;
    }
    
    .current-guess {
        font-size: 1.3rem;
        min-width: 160px;
    }
    
    .control-details {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .difficulty-selector {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .secondary-row {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        margin-top: 10px;
    }
}

/* Control Box Styles - Now inherits from .box */
.control-box {
    /* Styling now handled by .box class */
    padding: 20px; /* Override .box padding for controls */
}

.control-banner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-icon {
    font-size: 1.8rem;
    color: #2c5530;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.control-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c5530;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.control-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Navigation Info - Match control-box styling */
.navigation-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    width: 100%;
    box-sizing: border-box;
}

/* Setup modal styles */
.setup-option {
    margin: 20px 0;
}

.setup-option label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c5530;
}

.setup-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Roboto Slab', serif;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.setup-select:focus {
    outline: none;
    border-color: #228b22;
    box-shadow: 0 0 5px rgba(34, 139, 34, 0.3);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 25px;
}

.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: 'Roboto Slab', serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.modal-btn.primary {
    background: #228b22;
    color: white;
}

.modal-btn.primary:hover {
    background: #1e7e1e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-btn.secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.modal-btn.secondary:hover {
    background: #e9e9e9;
    border-color: #ccc;
}

/* Auth section styling */
.auth-section {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.login-btn, .dashboard-btn {
    background: linear-gradient(135deg, #2196f3, #42a5f5);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(33, 150, 243, 0.3);
    text-decoration: none;
}

.login-btn:hover, .dashboard-btn:hover {
    background: linear-gradient(135deg, #1976d2, #2196f3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

.dashboard-btn {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.3);
}

.dashboard-btn:hover {
    background: linear-gradient(135deg, #f57c00, #ff9800);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

/* Edit Profile Button Styling - Green Golf Theme */
.edit-profile-btn {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.edit-profile-btn:hover {
    background: linear-gradient(135deg, #388e3c, #4caf50);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.lock-indicator {
    font-size: 12px;
    opacity: 0.8;
    margin-left: 4px;
}

.navigation-grid {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.nav-grid-btn {
    background: #228b22;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Roboto Slab', serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    min-height: 45px;
}

.nav-grid-btn:hover {
    background: #1e7e1e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.nav-grid-btn i {
    font-size: 14px;
    flex-shrink: 0;
}

/* Dev tool buttons styling */
.nav-grid-btn.dev-tool {
    background: #6c757d;
    opacity: 0.8;
    font-size: 12px;
    padding: 10px 12px;
}

.nav-grid-btn.dev-tool:hover {
    background: #5a6268;
    opacity: 1;
}

/* Mobile responsive navigation */
@media (max-width: 768px) {
    .navigation-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .navigation-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .nav-grid-btn {
        padding: 10px 12px;
        font-size: 12px;
        min-height: 40px;
    }
}

.practice-btn {
    background: #228b22;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-family: 'Roboto Slab', serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.practice-btn:hover {
    background: #1e7e1e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.practice-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #2c5530;
    border: 2px solid rgba(44, 85, 48, 0.2);
    padding: 8px 16px;
    border-radius: 12px;
    font-family: 'Roboto Slab', serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    white-space: nowrap;
    backdrop-filter: blur(5px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #2c5530;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Header */
.game-header {
    text-align: center;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(34, 139, 34, 0.3);
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1b5e20;
    margin: 0 0 5px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.game-title i {
    color: #4caf50;
    flex-shrink: 0;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.game-subtitle {
    font-size: 1rem;
    color: #388e3c;
    font-weight: 300;
}

/* Course Info */
.course-info {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.95), rgba(139, 195, 74, 0.95));
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    width: 100%;
    box-sizing: border-box;
}

.course-banner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.course-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.course-icon {
    font-size: 2.2rem;
    color: #2c5530;
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.8));
}

.course-name {
    font-size: 1.7rem !important;
    font-weight: 700;
    color: #2c5530;
    margin: 0;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.tournament-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #2c5530;
    opacity: 0.8;
    display: block;
    margin-top: 2px;
}

.course-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    width: 100%;
    flex-wrap: nowrap;
    gap: 12px;
}

.hole-indicator {
    font-size: 1rem;
    font-weight: 600;
    color: #2c5530;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

.difficulty-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c5530;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(44, 85, 48, 0.2);
}

.difficulty-icon {
    font-size: 0.7rem;
}

.difficulty-badge.easy .difficulty-icon {
    color: #4caf50;
}

.difficulty-badge.medium .difficulty-icon {
    color: #ff9800;
}

.difficulty-badge.hard .difficulty-icon {
    color: #f44336;
}

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

.course-header h3 {
    margin: 0;
    color: #1b5e20;
    font-size: 1.2rem;
}

.hole-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.hole-number {
    color: #666;
}

.difficulty {
    text-align: right;
}

.difficulty {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    margin-top: 4px;
    font-size: 0.8rem;
}

.difficulty.easy { background: #c8e6c9; color: #2e7d32; }
.difficulty.medium { background: #fff3e0; color: #f57c00; }
.difficulty.hard { background: #ffcdd2; color: #d32f2f; }

/* Scoreboard */
.scoreboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f2f8e8;
    padding: 10px;
    border-radius: 12px;
    font-family: 'Roboto Slab', serif;
    color: #2b3d1f;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(76, 175, 80, 0.3);
    width: 100%;
    box-sizing: border-box;
}

.score-row {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin: 4px 0;
}

.score-row div, .score-row i {
    text-align: center;
    width: 25%;
}

.score-row i {
    font-size: 20px;
    color: #2b3d1f;
}

.course-action-btn {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #2b3d1f;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.course-action-btn:hover {
    background: rgba(76, 175, 80, 0.2);
    color: #1b5e20;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Timer Display Box */
.timer-box {
    display: flex;
    align-items: center;
    background: rgba(40, 167, 69, 0.1);
    border: 2px solid var(--golf-green);
    border-radius: 8px;
    padding: 8px 12px;
    margin-left: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--golf-green);
}

.timer-box i {
    margin-right: 6px;
    font-size: 12px;
}

.timer-box span {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.labels div {
    font-weight: 600;
    font-size: 14px;
}

.values div {
    font-weight: bold;
    font-size: 16px;
}

/* Game Board */
.game-board {
    flex: 1;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.guess-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 350px;
}

.guess-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.letter-cell {
    width: 70px;
    height: 70px;
    border: 3px solid rgba(76, 175, 80, 0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.9);
    color: #2c5530;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.letter-cell.correct {
    background: #4caf50;
    color: white;
    border-color: #388e3c;
    animation: flip 0.6s ease-in-out;
}

.letter-cell.present {
    background: #fdd835;
    color: #333;
    border-color: #fdd835;
    animation: flip 0.6s ease-in-out;
}

.letter-cell.sand {
    background: #d2b48c;
    color: #8b4513;
    border-color: #a0845c;
    animation: flip 0.6s ease-in-out;
    box-shadow: 0 0 0 2px #d2b48c, inset 0 0 0 2px rgba(139, 69, 19, 0.3);
}



.letter-cell.correct.caddy-border {
    background: #4caf50;
    color: white;
    border: 3px solid #c0c0c0;
    animation: flip 0.6s ease-in-out;
    box-shadow: 0 0 0 2px #4caf50, 0 0 0 5px #c0c0c0;
}

.letter-cell.sand.caddy-border {
    background: #d2b48c;
    color: #8b4513;
    border: 3px solid #c0c0c0;
    animation: flip 0.6s ease-in-out;
    box-shadow: 0 0 0 2px #d2b48c, 0 0 0 5px #c0c0c0;
}

.letter-cell.present.caddy-border {
    background: #fdd835;
    color: #333;
    border: 3px solid #c0c0c0;
    animation: flip 0.6s ease-in-out;
    box-shadow: 0 0 0 2px #fdd835, 0 0 0 5px #c0c0c0;
}

.letter-cell.absent {
    background: #607d8b;
    color: white;
    border-color: #455a64;
    animation: flip 0.6s ease-in-out;
}

.letter-cell.water-hazard {
    background: #2196f3;
    color: white;
    border-color: #1976d2;
    animation: flip 0.6s ease-in-out;
    box-shadow: 0 0 0 2px #2196f3, inset 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.letter-cell.out-of-bounds {
    background: #000000;
    color: white;
    border-color: #333333;
    animation: flip 0.6s ease-in-out;
    position: relative;
}



.letter-cell.filled {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
    animation: pulse 0.3s ease;
}

/* Typing state - match empty cell appearance while typing */
.letter-cell.typing {
    background: rgba(255, 255, 255, 0.9);
    border-color: #2c5530;
    border-width: 2px;
    color: #2c5530;
    /* Don't override game colors with !important */
}

/* Wordle-Style Web Keyboard */
.web-keyboard {
    margin: 20px 0;
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    border: 2px solid rgba(76, 175, 80, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    box-sizing: border-box;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 5px;
}

.keyboard-row:last-child {
    margin-bottom: 0;
}

.key {
    background: #d3d6da;
    border: none;
    border-radius: 8px;
    color: #1a1a1b;
    cursor: pointer;
    font-family: 'Roboto Slab', serif;
    font-size: 16px !important;
    font-weight: bold;
    height: 40px;
    line-height: 1;
    min-width: 28px;
    padding: 0;
    text-transform: uppercase;
    transition: all 0.1s ease;
    user-select: none;
    touch-action: manipulation !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key:hover {
    background: #c3c5c9;
}

.key.special-key {
    font-size: 16px !important;
    min-width: 50px;
    padding: 0 6px;
    /* Anti-zoom protection for special keys like delete */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Key color states matching ParWords game logic */
.key.correct {
    background: #4caf50;
    color: white;
}

.key.present {
    background: #fdd835;
    color: #333;
}

.key.sand {
    background: #d2b48c;
    color: #8b4513;
}

.key.absent {
    background: #607d8b;
    color: white;
}

.key.water-hazard {
    background: #2196f3;
    color: white;
}

.key.out-of-bounds {
    background: #000000;
    color: white;
}



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

.used-letters-label {
    font-size: 1rem;
    color: #2c5530;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-label {
    font-size: 0.9rem;
    color: #2c5530;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #fdd835;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.keyboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    transition: opacity 0.3s ease, max-height 0.3s ease;
    overflow: hidden;
}

.keyboard.hidden {
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
}

.keyboard-row {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.letter {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.8);
    color: #2c5530;
    border: 1px solid rgba(76, 175, 80, 0.3);
    transition: all 0.2s ease;
    cursor: default;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.letter.used {
    background: rgba(108, 117, 125, 0.8);
    color: #fff;
    border-color: #6c757d;
    text-shadow: none;
}

.letter.correct {
    background: #4caf50;
    color: white;
}

.letter.present {
    background: #fdd835;
    color: #333;
}

.letter.sand {
    background: #d2b48c;
    color: #8b4513;
}



.letter.absent {
    background: #607d8b;
    color: #fff;
    border-color: #455a64;
    text-shadow: none;
}

/* Input Section */
.input-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(76, 175, 80, 0.3);
    margin-bottom: 20px;
}

.input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#guess-input {
    flex: 1;
    padding: 15px;
    border: 2px solid rgba(76, 175, 80, 0.4);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    color: #2c5530;
    transition: all 0.3s ease;
}

#guess-input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.submit-btn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #66bb6a, #4caf50);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.difficulty-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    justify-content: center;
}

.difficulty-selector label {
    font-weight: 600;
    color: #1b5e20;
    font-size: 1rem;
}

.difficulty-select {
    padding: 8px 12px;
    border: 2px solid rgba(76, 175, 80, 0.4);
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c5530;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.difficulty-select:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.difficulty-select option {
    padding: 8px;
    background: white;
    color: #2c5530;
}

.game-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.control-btn {
    padding: 12px 20px;
    background: rgba(96, 125, 139, 0.9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-btn:hover {
    background: #607d8b;
    transform: translateY(-2px);
}

/* Penalties Section - Hidden (penalties now integrated into shot tracking) */
.penalties-section {
    display: none !important;
}

/* Penalty notification animations */
.penalty-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 107, 107, 0.95);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    animation: slideInPenalty 0.5s ease-out forwards, slideOutPenalty 0.5s ease-in 3s forwards;
    z-index: 1000;
    max-width: 300px;
    font-size: 14px;
}

.penalty-notification.sand-trap {
    background: rgba(210, 180, 140, 0.95);
    color: #8b4513;
}

.penalty-notification.water-hazard {
    background: rgba(52, 152, 219, 0.95);
    color: white;
}

.penalty-notification.out-of-bounds {
    background: rgba(44, 62, 80, 0.95);
    color: white;
}

@keyframes slideInPenalty {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutPenalty {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

/* Tutorial Modal Styles */
.tutorial-modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.tutorial-step h3 {
    color: #2c5530;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.tutorial-highlight {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid #4caf50;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.tutorial-demo {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.demo-row {
    display: flex;
    gap: 5px;
}

.demo-letter {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 4px;
    color: white;
}

.demo-letter.correct { background: #4caf50; }
.demo-letter.present { background: #fdd835; color: #333; }
.demo-letter.sand { background: #d2b48c; color: #8b4513; }

.demo-letter.absent { background: #757575; }

.tutorial-legend {
    margin-top: 15px;
}

.tutorial-legend div {
    display: flex;
    align-items: center;
    margin: 8px 0;
    font-size: 0.9rem;
}

.legend-box {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 10px;
    display: inline-block;
}

.legend-box.correct { background: #4caf50; }
.legend-box.present { background: #fdd835; }
.legend-box.sand { background: #d2b48c; }

.legend-box.absent { background: #757575; }

.penalty-demo {
    margin: 15px 0;
}

.demo-penalty {
    padding: 10px;
    margin: 8px 0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.demo-penalty.out-of-bounds {
    background: rgba(244, 67, 54, 0.1);
    border-left: 4px solid #f44336;
}

.demo-penalty.water-hazard {
    background: rgba(33, 150, 243, 0.1);
    border-left: 4px solid #2196f3;
}

.demo-penalty.sand-trap {
    background: rgba(205, 164, 115, 0.1);
    border-left: 4px solid #d2b48c;
}



.tutorial-tips div {
    margin: 10px 0;
    padding: 8px;
    background: rgba(255, 235, 59, 0.1);
    border-radius: 4px;
    font-size: 0.9rem;
}

.tutorial-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}



/* Beta Notice Styles */
.beta-notice {
    margin-top: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.1));
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 8px;
}

.beta-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.beta-content i {
    font-size: 1.5rem;
    color: #3498db;
}

.beta-text h4 {
    margin: 0 0 0.25rem 0;
    color: #2c3e50;
    font-size: 1rem;
}

.beta-text p {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.disabled-card {
    opacity: 0.6;
    position: relative;
}

.disabled-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    pointer-events: none;
}

.coming-soon {
    color: #e67e22 !important;
    font-weight: 600;
}

.start-course-btn.disabled {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
}

.start-course-btn.disabled:hover {
    background: #bdc3c7;
    transform: none;
}

/* Tournament Settings */
.tournament-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.game-mode-selection {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.game-mode-selection label {
    font-weight: 600;
    color: #2c5530;
    font-size: 0.9rem;
}

.game-mode-selection select {
    padding: 8px 12px;
    border: 2px solid #4caf50;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

.game-options {
    padding: 15px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.option-group {
    margin-bottom: 10px;
}

.option-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.85rem;
    color: #2c5530;
    gap: 8px;
}

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

.game-options.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .letter {
        min-width: 28px;
        height: 28px;
        font-size: 0.8rem;
        padding: 2px;
    }

    .toggle-switch {
        transform: scale(0.8);
    }

    .control-btn {
        padding: 10px 14px;
        font-size: 0.8rem;
        min-width: auto;
    }

    .game-controls {
        gap: 8px;
    }

    .penalty-notification {
        right: 10px;
        top: 10px;
        max-width: 250px;
        font-size: 12px;
        padding: 10px 12px;
    }

    .modal-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
    }

    .tutorial-modal-content {
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .letter {
        min-width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .demo-letter {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .control-btn {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .game-header {
        margin: 10px 0;
        padding: 12px 8px;
        border-radius: 10px;
    }
    
    .header-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .game-header h1,
    .game-title {
        font-size: 1.1rem;
        gap: 6px;
        margin: 0;
        text-align: center;
        width: 100%;
        justify-content: center;
    }
    
    .game-title i {
        font-size: 1.6rem;
    }
    
    .game-subtitle {
        font-size: 0.85rem;
        margin: 5px 0 0 0;
        text-align: center;
        width: 100%;
    }
}

/* Daily Challenge Styles */
.daily-challenge-btn {
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
}

.daily-challenge-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b35, #ff8c42, #ffbe0b);
    z-index: -1;
    border-radius: inherit;
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.daily-challenge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

/* Profile Navigation Buttons */
.profile-navigation {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: auto;
    margin-right: 10px;
}

.profile-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(145deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.profile-nav-btn:hover {
    background: linear-gradient(145deg, #45a049, #3d8b40);
    transform: translateY(-1px);
}

.profile-nav-btn i {
    font-size: 14px;
}

.message-badge, .request-badge, .inbox-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

/* Friends and Messages Modal Styles */
.friends-section, .messages-section {
    margin-top: 20px;
}

.friends-message, .messages-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 500;
}

.friends-message.success, .messages-message.success {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.friends-message.error, .messages-message.error {
    background: rgba(244, 67, 54, 0.1);
    color: #d32f2f;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.friends-tabs, .messages-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn.active,
.tab-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.tab-content {
    display: none;
    min-height: 300px;
}

.tab-content.active {
    display: block;
}

/* Friends List Styles */
.friends-list, .requests-list, .messages-list {
    max-height: 400px;
    overflow-y: auto;
}

.friend-item, .request-item, .message-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.friend-item:hover, .request-item:hover, .message-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.friend-avatar, .request-avatar, .message-sender-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #4CAF50, #45a049);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.friend-info, .request-info, .message-info {
    flex: 1;
}

.friend-name, .request-name, .message-subject {
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.friend-status, .request-date, .message-preview {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* Friend Code Display */
.friend-code-display {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.friend-code-display input {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    text-align: center;
    letter-spacing: 2px;
}

/* Privacy Settings */
.privacy-settings {
    padding: 20px;
}

.setting-option {
    margin-bottom: 15px;
}

.setting-option label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setting-option label:hover {
    background: rgba(255, 255, 255, 0.1);
}

.setting-option input[type="radio"] {
    margin: 0;
}

.setting-option i {
    font-size: 20px;
    color: #4CAF50;
    width: 24px;
    text-align: center;
}

.setting-option span {
    flex: 1;
    font-weight: 600;
    color: white;
}

.setting-option small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}

/* No content messages */
.no-friends-message, .no-requests-message, .no-messages-message {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.no-friends-message i, .no-requests-message i, .no-messages-message i {
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-friends-message p, .no-requests-message p, .no-messages-message p {
    margin: 10px 0;
}

/* Action buttons */
.friend-actions, .request-actions, .message-actions {
    display: flex;
    gap: 8px;
}

.friend-actions button, .request-actions button, .message-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.accept-btn {
    background: #4CAF50;
    color: white;
}

.decline-btn, .remove-btn {
    background: #f44336;
    color: white;
}

.view-btn, .reply-btn {
    background: #2196F3;
    color: white;
}

/* Dashboard Button Styling */
.dashboard-btn {
    background: linear-gradient(45deg, #4a90e2, #357abd);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    position: relative;
    overflow: hidden;
}

.dashboard-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #4a90e2, #357abd, #2c5da0);
    z-index: -1;
    border-radius: inherit;
    animation: dashboardShimmer 2s ease-in-out infinite;
}

@keyframes dashboardShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.dashboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
}

.daily-challenge-info {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border: 2px solid #dee2e6;
}

.challenge-date {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.challenge-format {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 1rem;
}

.challenge-progress {
    margin: 2rem 0;
}

.commentary-container {
    background-color: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin: 8px auto;
    width: 95%;
    max-width: 600px;
    font-family: 'Arial', sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.commentary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-weight: bold;
    cursor: pointer;
}

.commentary-body {
    display: none;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
    background-color: #ffffff;
    border-top: 1px solid #ddd;
    max-height: 150px;
    overflow-y: auto;
}

.caret {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.caret.open {
    transform: rotate(180deg);
}

.hole-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.hole-status {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.hole-status.completed {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
}

.hole-status.current {
    border-color: #007bff;
    background: linear-gradient(135deg, #cce5ff, #b3d9ff);
    transform: scale(1.05);
}

.hole-number {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.hole-par {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.hole-score {
    font-weight: 700;
    font-size: 1.1rem;
    color: #28a745;
}

.hole-score.over-par {
    color: #dc3545;
}

.hole-score.under-par {
    color: #007bff;
}

.total-progress {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.challenge-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.primary-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.secondary-btn {
    background: white;
    color: #007bff;
    border: 2px solid #007bff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.secondary-btn:hover {
    background: #007bff;
    color: white;
    transform: translateY(-1px);
}

.authentication-notice {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #ffc107;
    border-radius: 12px;
    text-align: center;
}

.auth-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.auth-message i {
    font-size: 2rem;
    color: #ff6b35;
}

.auth-message p {
    margin: 0;
    color: #856404;
    max-width: 300px;
}

.login-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

    .help-icon {
        font-size: 0.7em;
    }
}

/* Game Status - Now inherits from .box */
.game-status {
    /* Styling now handled by .box class */
    padding: 1.5rem; /* Override .box padding for status */
}

.status-header {
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 253, 248, 0.95));
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-header h3 {
    margin: 0;
    color: #1b5e20;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.status-header i {
    margin-right: 8px;
    color: #2e7d32;
}

.status-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hole-info {
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 253, 248, 0.9));
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.2);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.hole-prompt {
    margin: 0;
    font-size: 1.1rem;
    color: #1b5e20;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.guess-history {
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    padding: 1rem;
}

.guess-history h4 {
    margin: 0 0 0.5rem 0;
    color: #2e7d32;
    font-size: 1rem;
    font-weight: 600;
}

.guess-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.guess-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    border-left: 4px solid #4caf50;
}

.guess-word {
    font-weight: 600;
    font-size: 1rem;
    color: #1b5e20;
}

.guess-result {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.penalty-badge {
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.penalty-badge.water-hazard {
    background: #2196f3;
    color: white;
}

.penalty-badge.out-of-bounds {
    background: #f44336;
    color: white;
}

.penalty-badge.sand-trap {
    background: #ff9800;
    color: white;
}

.current-status {
    text-align: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(232, 245, 232, 0.95));
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.4);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.status-message {
    margin: 0;
    font-size: 1rem;
    color: #1b5e20;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.status-message.success {
    color: #1b5e20;
    font-weight: 600;
}

.status-message.penalty {
    color: #d32f2f;
    font-weight: 600;
}

.status-message.hint {
    color: #ff8f00;
    font-weight: 600;
}

/* Mobile responsiveness for game status */
@media (max-width: 768px) {
    .game-status {
        max-width: 95%;
        padding: 1rem;
        margin: 1rem auto;
    }
    
    .status-header h3 {
        font-size: 1.1rem;
    }
    
    .guess-entry {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.75rem 0.5rem;
    }
    
    .guess-word {
        font-size: 1.1rem;
    }
    
    .guess-result {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .penalty-badge {
        font-size: 0.7rem;
        padding: 1px 4px;
    }
}

/* Share functionality */
.share-success {
    color: #4caf50;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-fallback {
    color: #2c5530;
}

.share-fallback .url-display {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
}

.share-fallback input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    background: white;
    color: #333;
}

.share-fallback button {
    padding: 8px 12px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.share-fallback button:hover {
    background: #45a049;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    overflow: hidden; /* Prevent background scrolling */
}

/* Share modal should appear above all other modals */
#share-modal {
    z-index: 2500 !important;
}

/* Leaderboard modal should also appear above final scorecard */
#daily-leaderboard-modal {
    z-index: 2500 !important;
}

.modal.show {
    display: flex !important;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 3px solid #4caf50;
    position: relative;
    text-align: center;
    margin: auto;
}

.modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding-right: 5px; /* Space for scrollbar */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8f5e8;
    padding-bottom: 15px;
}

.modal-header h2 {
    color: #1b5e20;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.final-score-display {
    margin-bottom: 20px;
}

.score-breakdown {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.score-breakdown p {
    margin: 8px 0;
    font-size: 1rem;
    color: #2c5530;
}

.score-description {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
}

.score-description.eagle {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
}

.score-description.birdie {
    background: linear-gradient(135deg, #8bc34a, #689f38);
    color: white;
}

.score-description.par {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
}

.score-description.bogey {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

.score-description.double-bogey {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.play-again-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.play-again-btn:hover {
    background: linear-gradient(135deg, #66bb6a, #4caf50);
    transform: translateY(-2px);
}

.next-hole-btn {
    width: 48%;
    padding: 15px;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-right: 4%;
}

.next-hole-btn:hover {
    background: linear-gradient(135deg, #42a5f5, #2196f3);
    transform: translateY(-2px);
}

.hole-completion-buttons {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.hole-completion-buttons .play-again-btn {
    width: 48%;
}

/* Course Selection Modal */
.course-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.course-option {
    border: 2px solid rgba(76, 175, 80, 0.3);
    border-radius: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.course-option:hover {
    border-color: #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.course-option h3 {
    margin: 0 0 8px 0;
    color: #1b5e20;
    font-size: 1.3rem;
}

.auth-required {
    color: #ff6b6b;
    font-weight: 500;
    font-size: 0.9em;
}

/* Invalid word notification animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.course-option p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9rem;
}

.select-course-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-course-btn:hover {
    background: linear-gradient(135deg, #66bb6a, #4caf50);
    transform: translateY(-2px);
}

/* Daily Challenge Course Option */
.daily-challenge-option {
    border: 2px solid rgba(255, 107, 53, 0.3);
    background: rgba(255, 152, 0, 0.08);
    transition: all 0.3s ease;
}

.daily-challenge-option:hover {
    border-color: #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
    background: rgba(255, 152, 0, 0.12);
}

.daily-challenge-option h3 {
    color: #ff6b35;
}

.daily-challenge-option h3 i {
    margin-right: 8px;
}

.daily-challenge-option p {
    color: #e65100;
}

.daily-challenge-option .select-course-btn {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
}

.daily-challenge-option .select-course-btn:hover {
    background: linear-gradient(135deg, #ff8c42, #ff6b35);
    transform: translateY(-2px);
}

/* Scorecard Modal */
.scorecard-content {
    max-width: 600px;
    width: 95%;
    max-height: 80vh;
    overflow-y: auto;
}

/* New Daily Challenge Style Scorecard */
.scorecard-info-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(248, 249, 250, 0.95);
    border-radius: 12px;
    border: 2px solid rgba(76, 175, 80, 0.2);
}

.scorecard-title h3 {
    color: #2c5530;
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.scorecard-title p {
    color: #666;
    margin: 0;
    font-size: 1rem;
}

.hole-boxes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.hole-box {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hole-box.completed {
    border-color: #4caf50;
    background: linear-gradient(135deg, #f8fff8, #e8f5e8);
}

.hole-box.current {
    border-color: #2196f3;
    background: linear-gradient(135deg, #f0f8ff, #e3f2fd);
}

.hole-box h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.hole-box .par-display {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
}

.hole-box .score-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4caf50;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hole-box .score-display.pending {
    color: #999;
}

.total-score-display {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 2px solid #2196f3;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.total-score-box {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1976d2;
}

.total-label {
    margin-right: 8px;
}

/* Mobile responsiveness for hole boxes */
@media (max-width: 480px) {
    .hole-boxes-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .hole-box {
        padding: 12px;
    }
    
    .hole-box h4 {
        font-size: 1rem;
    }
    
    .hole-box .score-display {
        font-size: 1.3rem;
    }
}

.scorecard-header {
    position: relative;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(248, 249, 250, 0.95);
    border-radius: 12px;
    border: 2px solid rgba(76, 175, 80, 0.2);
    min-height: 60px;
}

.scorecard-header h3 {
    color: #2c5530;
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.scorecard-date {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #666;
    font-size: 0.9rem;
}

.scorecard-total-display {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.score-and-progress {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.total-score {
    font-size: 1.8rem;
    font-weight: bold;
    color: #d32f2f;
}

.progress-info {
    color: #666;
    font-size: 0.9rem;
}

.scorecard-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.85rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scorecard-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.scorecard-row span {
    padding: 6px 8px;
    border-right: 1px solid #e0e0e0;
}

.scorecard-row span:last-child {
    border-right: none;
}

.word-cell {
    background: rgba(76, 175, 80, 0.05);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scorecard-row.header {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
    font-weight: 600;
    border-bottom: 2px solid #2e7d32;
}

.scorecard-row.header span {
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.scorecard-row:nth-child(even):not(.header):not(.total) {
    background: rgba(76, 175, 80, 0.05);
}

.scorecard-row:not(.header):not(.total):hover {
    background: rgba(76, 175, 80, 0.1);
}

.scorecard-row.completed-hole {
    background: rgba(76, 175, 80, 0.1);
}

.scorecard-row.current-hole {
    background: rgba(33, 150, 243, 0.1);
    border-left: 4px solid #2196f3;
}

.scorecard-row.total {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
    font-weight: bold;
    border-top: 2px solid #2e7d32;
    font-size: 0.95rem;
}

.scorecard-row.total span {
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px;
}

.scorecard-final-totals {
    background: linear-gradient(135deg, #4caf50, #388e3c) !important;
    color: white !important;
    font-weight: bold;
    border-top: 2px solid #2e7d32 !important;
}

.scorecard-final-totals td {
    color: white !important;
    font-size: 0.9rem;
}

.scorecard-summary {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    padding: 6px 10px;
    margin: 5px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Daily Challenge-Style Scorecard Layout */
.scorecard-header-box {
    background: rgba(240, 245, 248, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    border: 2px solid rgba(34, 139, 34, 0.2);
}

.scorecard-header-box h3 {
    color: #2c5530;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.scorecard-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.scorecard-course-info {
    color: #4caf50;
    font-size: 1rem;
    font-weight: 500;
}

.scorecard-holes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.hole-score-box {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hole-score-box.current-hole {
    border-color: #ff6b35;
    background: rgba(255, 152, 0, 0.08);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.hole-score-box.completed-hole {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.08);
}

.hole-score-box.future-hole {
    border-color: #e0e0e0;
    background: rgba(240, 240, 240, 0.5);
}

.hole-number {
    color: #2c5530;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.hole-par {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.hole-score {
    color: #4caf50;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 6px;
}

.current-hole .hole-score {
    color: #ff6b35;
}

.hole-word {
    color: #888;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scorecard-total-box {
    background: rgba(200, 230, 201, 0.9);
    border: 2px solid #4caf50;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.total-label {
    color: #2c5530;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 6px;
}

.total-details {
    color: #666;
    font-size: 0.9rem;
}

/* Mobile responsive adjustments */
@media (max-width: 520px) {
    .scorecard-holes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .hole-score-box {
        padding: 12px;
        min-height: 100px;
    }
    
    .hole-score {
        font-size: 1.2rem;
    }
    
    .scorecard-header-box h3 {
        font-size: 1.2rem;
    }
}

/* Saved Game Info Styling */
.saved-game-info {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.saved-game-preview {
    text-align: center;
}

.saved-game-preview p {
    margin: 5px 0;
    color: #2e7d2e;
}

.saved-game-preview strong {
    color: #1b5e20;
}

/* Resume/Start New buttons */
#resume-course-btn {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    margin-right: 10px;
}

#resume-course-btn:hover {
    background: linear-gradient(135deg, #66bb6a, #4caf50);
}

#new-game-btn {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

#new-game-btn:hover {
    background: linear-gradient(135deg, #ffb74d, #ff9800);
}

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

/* Scorecard course name styling moved to main .course-name rule */

.course-date {
    font-size: 0.8rem;
    color: #666;
}

.scorecard-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.progress-text {
    font-size: 0.8rem;
    color: #666;
}

/* Mobile scorecard optimizations */
@media (max-width: 768px) {
    .scorecard-summary {
        padding: 4px 8px;
        margin: 3px 0;
        font-size: 0.85rem;
    }
    
    .course-name {
        font-size: 1rem;
    }
    
    .course-date, .progress-text {
        font-size: 0.75rem;
    }
    
    .scorecard-table {
        font-size: 0.75rem;
        margin: 8px 0;
    }
    
    .scorecard-table th,
    .scorecard-table td {
        padding: 3px 4px;
    }
}

.scorecard-summary h4 {
    margin: 0 0 10px 0;
    color: #1b5e20;
}

.total-score-display {
    font-size: 2rem;
    font-weight: 700;
    margin: 10px 0;
}

.total-score-display.under-par { color: #2e7d32; }
.total-score-display.even-par { color: #1976d2; }
.total-score-display.over-par { color: #d32f2f; }

/* Multiplayer Styles */
.multiplayer-setup {
    padding: 20px 0;
}

.player-name-section {
    margin-bottom: 20px;
}

.player-name-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1b5e20;
}

.player-name-section input {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(76, 175, 80, 0.4);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
}

.group-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.join-group-section {
    display: flex;
    gap: 10px;
}

.join-group-section input {
    flex: 1;
    padding: 12px;
    border: 2px solid rgba(76, 175, 80, 0.4);
    border-radius: 8px;
    font-size: 1rem;
    text-transform: uppercase;
    text-align: center;
}

.multiplayer-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.multiplayer-btn:hover {
    background: linear-gradient(135deg, #66bb6a, #4caf50);
    transform: translateY(-2px);
}

/* Lobby Styles */
.multiplayer-lobby {
    padding: 20px 0;
}

.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8f5e8;
}

.lobby-header h3 {
    margin: 0;
    color: #1b5e20;
    font-size: 1.3rem;
}

.leave-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lobby-players {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    min-height: 60px;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 6px;
}

.player-name {
    font-weight: 600;
    color: #1b5e20;
}

.player-status {
    font-size: 0.8rem;
    color: #666;
}

.lobby-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.lobby-controls select {
    flex: 1;
    padding: 10px;
    border: 2px solid rgba(76, 175, 80, 0.4);
    border-radius: 6px;
    background: white;
}

.start-course-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Captain Controls */
.captain-controls {
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    background: rgba(255, 193, 7, 0.1);
    margin-bottom: 10px;
}

.captain-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #f57c00;
    font-weight: 600;
    font-size: 0.95rem;
}

.captain-badge i {
    color: #ff9800;
}

.course-selection {
    margin-bottom: 15px;
}

.course-selection label {
    display: block;
    margin-bottom: 6px;
    color: #1b5e20;
    font-weight: 600;
}

.course-selection select {
    width: 100%;
    padding: 10px;
    border: 2px solid rgba(76, 175, 80, 0.4);
    border-radius: 6px;
    background: white;
}

/* Player Waiting */
.player-waiting {
    padding: 20px;
    text-align: center;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    margin-bottom: 10px;
}

.waiting-info i {
    font-size: 1.5rem;
    color: #4caf50;
    margin-bottom: 10px;
}

.waiting-info p {
    margin: 10px 0;
    color: #2e7d32;
    font-weight: 500;
}

.course-info {
    padding: 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #1b5e20;
}

/* Captain icon in player list */
.captain-icon {
    color: #ff9800;
    margin-left: 5px;
}

/* Settings Modal Styles */
.settings-modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
}

.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settings-section h3 {
    color: #16a34a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.setting-item {
    margin-bottom: 1.5rem;
    position: relative;
}

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

.toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    cursor: pointer;
    gap: 1rem;
    padding: 0.5rem 0;
}

.toggle-container .toggle-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
    display: block;
}

.toggle-container .toggle-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
    display: block;
}

.toggle-text-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toggle-container input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 48px;
    height: 24px;
    background-color: #d1d5db;
    border-radius: 12px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-container input[type="checkbox"]:checked + .toggle-slider {
    background-color: #16a34a;
}

.toggle-container input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.toggle-container input[type="checkbox"]:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.coming-soon {
    position: absolute;
    top: -5px;
    right: 60px;
    background-color: #fbbf24;
    color: #92400e;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    background-color: #f9fafb;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.modal-btn.primary {
    background-color: #16a34a;
    color: white;
}

.modal-btn.primary:hover {
    background-color: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(22, 163, 74, 0.3);
}

.modal-btn.secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.modal-btn.secondary:hover {
    background-color: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .settings-modal-content {
        margin: 1rem;
        max-height: 90vh;
    }

    .toggle-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .modal-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    .modal-btn {
        width: 100%;
        justify-content: center;
    }

    .coming-soon {
        position: static;
        margin-top: 0.5rem;
        align-self: flex-start;
    }
}
    font-size: 0.8rem;
}

/* Join mode message */
.join-mode-message {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(33, 150, 243, 0.1);
    border: 2px solid rgba(33, 150, 243, 0.3);
    border-radius: 8px;
    text-align: center;
}

.invite-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #1976d2;
    font-size: 1.1rem;
    font-weight: 600;
}

.invite-banner i {
    color: #2196f3;
    font-size: 1.3rem;
}

.join-mode-message p {
    margin: 0;
    color: #1565c0;
    font-size: 0.9rem;
}

/* Tournament Timer */
.tournament-timer {
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.timer-active {
    background: rgba(76, 175, 80, 0.15);
    border: 2px solid rgba(76, 175, 80, 0.4);
    color: #2e7d32;
}

.timer-expired {
    background: rgba(156, 39, 176, 0.15);
    border: 2px solid rgba(156, 39, 176, 0.4);
    color: #7b1fa2;
}

.timer-active i, .timer-expired i {
    font-size: 1.2rem;
    margin-right: 8px;
}

.timer-active span, .timer-expired span {
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.timer-active p, .timer-expired p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.8;
}

.timer-active strong {
    color: #1b5e20;
}

/* Chat Styles */
.group-chat {
    border: 2px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    height: 250px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px 6px 0 0;
}

.chat-message {
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.chat-message.system {
    background: rgba(76, 175, 80, 0.2);
    font-style: italic;
    text-align: center;
    color: #2e7d32;
}

.chat-player {
    font-weight: 600;
    color: #1b5e20;
    margin-right: 6px;
}

.chat-time {
    font-size: 0.7rem;
    color: #666;
    float: right;
}

.chat-input-section {
    display: flex;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0 0 6px 6px;
}

.chat-input-section input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    background: white;
}

.chat-send-btn {
    padding: 8px 12px;
    margin-left: 8px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

/* Group Leaderboard */
.group-leaderboard {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.group-leaderboard h4 {
    margin: 0 0 12px 0;
    color: #1b5e20;
    text-align: center;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 6px;
    background: rgba(76, 175, 80, 0.05);
}

.leaderboard-item.current-player {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid #4caf50;
}

.leaderboard-position {
    font-weight: 700;
    font-size: 1.2rem;
    color: #1b5e20;
    width: 30px;
}

.leaderboard-name {
    flex: 1;
    font-weight: 600;
    color: #2c5530;
}

.leaderboard-score {
    font-weight: 600;
    color: #1b5e20;
}

.leaderboard-holes {
    font-size: 0.8rem;
    color: #666;
    margin-left: 8px;
}

/* Difficulty Styling */
.difficulty.easy {
    background: rgba(76, 175, 80, 0.15);
    color: #2e7d32;
}

.difficulty.medium {
    background: rgba(255, 152, 0, 0.15);
    color: #ef6c00;
}

.difficulty.hard {
    background: rgba(244, 67, 54, 0.15);
    color: #c62828;
}

/* Invitation Section */
.invitation-section {
    background: rgba(33, 150, 243, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    border: 2px dashed rgba(33, 150, 243, 0.3);
}

.invite-header {
    text-align: center;
    margin-bottom: 15px;
}

.invite-header h4 {
    margin: 0 0 8px 0;
    color: #1976d2;
    font-size: 1.1rem;
}

.invite-header p {
    margin: 0;
    color: #333;
    font-size: 0.9rem;
}

.invite-header strong {
    color: #1976d2;
    font-size: 1.2rem;
    font-family: monospace;
    background: rgba(33, 150, 243, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.invite-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.invite-btn {
    padding: 8px 12px;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.invite-btn:hover {
    background: linear-gradient(135deg, #42a5f5, #2196f3);
    transform: translateY(-1px);
}

.invite-url {
    display: flex;
    gap: 8px;
    align-items: center;
}

.invite-url-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
    background: rgba(255, 255, 255, 0.8);
    color: #666;
}

.copy-url-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
}

/* Group Status Bar */
.group-status-bar {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 8px 15px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

.group-status-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1976d2;
}

.group-status-info i {
    color: #2196f3;
}

.group-player-count {
    background: rgba(33, 150, 243, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #1976d2;
}

.return-group-btn {
    padding: 4px 8px;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.return-group-btn:hover {
    background: linear-gradient(135deg, #42a5f5, #2196f3);
    transform: translateY(-1px);
}

/* Solo/Leave Button Styling */
.lobby-header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.solo-btn {
    padding: 6px 10px;
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.solo-btn:hover {
    background: linear-gradient(135deg, #66bb6a, #4caf50);
    transform: translateY(-1px);
}

/* Tournament Info Section */
.tournament-info {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    text-align: center;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tournament-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.tournament-banner i {
    font-size: 1.3rem;
    color: #ffd54f;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.tournament-info p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* How to Play Modal */
.large-modal {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.how-to-play-content {
    padding: 10px 0;
}

.help-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.help-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.help-section h3 {
    color: #2e7d32;
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-section h3 i {
    color: #4caf50;
}

.help-section p {
    margin: 0 0 10px 0;
    line-height: 1.5;
    color: #444;
}

.help-section ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.help-section li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.color-guide {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 15px 0;
}

.color-example {
    display: flex;
    align-items: center;
    gap: 12px;
}

.demo-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.demo-letter.correct {
    background: linear-gradient(135deg, #4caf50, #388e3c);
}

.demo-letter.wrong-position {
    background: linear-gradient(135deg, #ffb74d, #ff9800);
}

.demo-letter.sand-trap {
    background: linear-gradient(135deg, #d4ac0d, #b7950b);
}

/* Silver border demo for duplicate letters */
.demo-letter[style*="silver"] {
    box-shadow: 0 0 0 3px silver;
}

.demo-letter.silver-border {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Legend box styling for tutorial */
.legend-box {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 4px;
    margin-right: 8px;
    vertical-align: middle;
}

.legend-box.correct {
    background: #4caf50;
}

.legend-box.present {
    background: #ff9800;
}

.legend-box.sand {
    background: #d4ac0d;
}

.legend-box.absent {
    background: #666;
}

.demo-letter.water-hazard {
    background: linear-gradient(135deg, #2196f3, #1976d2);
}

.demo-letter.out-of-bounds {
    background: linear-gradient(135deg, #424242, #212121);
    position: relative;
}

.demo-letter.out-of-bounds::after {
    content: '×';
    position: absolute;
    color: #f44336;
    font-size: 20px;
    font-weight: bold;
}

.course-guide {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.course-guide div {
    padding: 8px 12px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 6px;
    border-left: 4px solid #4caf50;
}

.tips {
    background: rgba(255, 193, 7, 0.1);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.tips h3 {
    color: #f57c00;
}

.tips h3 i {
    color: #ffc107;
}

@media (max-width: 768px) {
    .large-modal {
        max-width: 95vw;
        margin: 20px;
    }
    
    .color-example {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .help-section {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
}

/* Animations */
@keyframes flip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(90deg); }
    100% { transform: rotateY(0deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-10px); }
    70% { transform: translateY(-5px); }
    90% { transform: translateY(-2px); }
}



/* Mobile Responsiveness */
@media (max-width: 480px) {
    .game-container {
        padding: 15px;
    }
    
    .course-icon {
        font-size: 1.8rem;
    }
    
    .course-name {
        font-size: 1.5rem !important;
    }
    
    .course-details {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        width: 100%;
        flex-wrap: nowrap;
    }
    
    .difficulty-badge {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    /* Compact web keyboard on mobile */
    .web-keyboard {
        padding: 15px 8px;
        margin: 15px 0;
    }
    
    .keyboard-row {
        gap: 2px;
        margin-bottom: 4px;
    }
    
    .key {
        height: 42px;
        min-width: 28px;
        font-size: 16px !important;
    }
    
    .key.special-key {
        font-size: 16px !important;
        min-width: 48px;
        padding: 0 5px;
    }
    
    .letter-cell {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }
    
    .scoreboard {
        padding: 12px 8px;
        gap: 4px;
    }
    
    .score-item {
        padding: 6px 2px;
        min-height: 70px;
    }
    
    .score-item i {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }
    
    .score-label {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
    
    .score-value {
        font-size: 1.3rem;
    }

    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .letter-cell {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .input-container {
        flex-direction: column;
    }
    
    .submit-btn {
        justify-content: center;
    }
    
    .scoreboard {
        flex-direction: column;
        gap: 10px;
    }
    
    .score-item {
        flex-direction: row;
        justify-content: space-between;
        padding: 8px 15px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 20px;
    }
}

@media (max-width: 360px) {
    .guess-grid {
        gap: 6px;
    }
    
    .guess-row {
        gap: 6px;
    }
    
    .letter-cell {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* Background Texture Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://pixabay.com/get/gbc168daca8086dc4c3b0412b9fe0687e88cd7cf5b948f517b141ef69b240e11d3a9bda63107eb7f27296b23b955ddbb88b2f79640d802936dba406ad3aa3a209_1280.jpg') repeat;
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}

/* Recent Scores Section Styles */
.recent-scores-section {
    margin-top: 20px;
}

.recent-scores-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.recent-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #4caf50;
    transition: all 0.2s ease;
}

.recent-score-item:hover {
    transform: translateX(2px);
    background: #f1f8e9;
}

.score-info {
    flex: 1;
}

.score-course {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.score-date {
    font-size: 0.85em;
    color: #666;
}

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

.score-total {
    font-weight: bold;
    font-size: 1.1em;
    color: #4caf50;
}

.score-strokes {
    font-size: 0.85em;
    color: #666;
}

#no-recent-scores {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Saved Games Section Styles */
.saved-games-section {
    margin-top: 20px;
}

.saved-games-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.saved-game-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #e74c3c;
    transition: all 0.2s ease;
}

.saved-game-item:hover {
    transform: translateX(2px);
    background: #fdf2f2;
}

.saved-game-info {
    flex: 1;
}

.saved-game-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.saved-game-date {
    font-size: 0.85em;
    color: #666;
}

.saved-game-score {
    text-align: center;
    margin: 0 15px;
}

.saved-game-total {
    font-weight: bold;
    font-size: 1.1em;
    color: #e74c3c;
}

.saved-game-strokes {
    font-size: 0.85em;
    color: #666;
}

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

.btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-small.secondary {
    background: #6c757d;
    color: white;
}

.btn-small.secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-small.danger {
    background: #dc3545;
    color: white;
}

.btn-small.danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

#no-saved-games {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Save Game Button Styles */
#save-game-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

#save-game-btn:hover {
    background: linear-gradient(135deg, #218838, #1db584);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* ===== USER DASHBOARD STYLES ===== */

/* Dashboard Button Styling */
.dashboard-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049) !important;
    border: none !important;
    position: relative;
    overflow: hidden;
}

.dashboard-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
}

.dashboard-btn:hover::before {
    left: 100%;
}

/* Scorecard Actions */
.scorecard-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px 0 10px 0;
    border-top: 2px solid #e8f5e8;
    margin-top: 20px;
}

.scorecard-actions .next-hole-btn,
.scorecard-actions .course-complete-btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.scorecard-actions .next-hole-btn {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.scorecard-actions .next-hole-btn:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.scorecard-actions .course-complete-btn {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.scorecard-actions .course-complete-btn:hover {
    background: linear-gradient(135deg, #f57c00, #ef6c00);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.4);
}

/* Word cell styling */
.word-cell {
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: #2c5530;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 4px;
    padding: 4px 6px;
}

/* Enhanced Leaderboard Styles */
.leaderboard-modal .modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
}

.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    border-bottom: 2px solid #e8f5e8;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 8px 16px;
    background: none;
    border: 2px solid #4caf50;
    border-radius: 6px;
    color: #4caf50;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #4caf50;
    color: white;
}

.tab-btn:hover {
    background: #4caf50;
    color: white;
}

/* My Rank Section */
.my-rank-section {
    margin: 20px 0;
}

.rank-card {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 15px;
}

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

.rank-number {
    font-size: 2rem;
    font-weight: bold;
}

.rank-details {
    text-align: right;
}

.rank-score {
    font-size: 1.2rem;
    font-weight: 600;
}

.rank-tie-info {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 10px;
}

/* Leaderboard Styles */
.leaderboard {
    width: 100%;
    max-width: 450px;
    background: #fff;
    border: 2px solid #006400;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    margin: 0 auto;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 40px 1fr 60px 50px; /* rank | username | strokes | score */
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
}

.leaderboard-row.header {
    font-weight: bold;
    background: #f0f0f0;
    border-bottom: 2px solid #006400;
}

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

/* Legacy support for existing leaderboard-entry class */
.leaderboard-header {
    display: grid;
    grid-template-columns: 50px 1fr 80px 60px;
    align-items: center;
    padding: 12px;
    background: #f5f5f5;
    border-bottom: 2px solid #4CAF50;
    font-weight: bold;
    font-size: 0.9rem;
    color: #1b5e20;
    gap: 8px;
}

.leaderboard-content {
    min-height: 100px;
    background: #f8f9fa !important;
    border: 2px solid #28a745 !important;
    border-radius: 8px;
    padding: 16px !important;
    margin: 16px 0;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
}

.leaderboard-content * {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.leaderboard-entry {
    display: grid;
    grid-template-columns: 50px 1fr 70px 60px;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #ddd;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
    border-radius: 4px;
    min-height: 40px;
    border: 1px solid #ccc;
}

.leaderboard-entry:hover {
    background: #e8f5e8;
}

.leaderboard-entry.top-3 {
    background: linear-gradient(135deg, #fff9c4, #ffecb3);
}

.leaderboard-entry.tied {
    background: #fff3e0;
}

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

.rank, .leaderboard-rank {
    text-align: center;
    font-weight: bold;
}

.leaderboard-rank.first {
    color: #FFD700;
    font-size: 1.1rem;
}

.leaderboard-rank.second {
    color: #C0C0C0;
    font-size: 1.05rem;
}

.leaderboard-rank.third {
    color: #CD7F32;
    font-size: 1.05rem;
}

.leaderboard-score, .score-to-par, .leaderboard-time {
    text-align: center;
    font-weight: bold;
}

.leaderboard-time {
    color: #4caf50;
    font-family: monospace;
    font-size: 0.9rem;
}

.score-under-par {
    color: #2e7d32;
}

.score-over-par {
    color: #d32f2f;
}

.username {
    padding-left: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.strokes, .score {
    text-align: right;
    font-weight: bold;
}

/* Legacy support */
.leaderboard-player {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4CAF50;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.player-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: #1b5e20;
}

.player-score {
    font-family: monospace;
    text-align: right;
    font-weight: bold;
    color: #1b5e20;
    padding-right: 0.2rem;
}

.score-par {
    font-family: monospace;
    text-align: right;
    color: #666;
    justify-self: end;
}

.completion-time {
    font-size: 0.8rem;
    color: #888;
}

.tie-indicator {
    background: #ff9800;
    color: white;
    padding: 1px 5px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: bold;
    margin-left: 6px;
    white-space: nowrap;
}

/* Full Leaderboard Styles */
.leaderboard-stats {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

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

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #1b5e20;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #e8f5e8;
}

.pagination-btn {
    padding: 8px 16px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #45a049;
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#page-info {
    font-weight: 500;
    color: #1b5e20;
}

/* Saved Games Modal Styles */
.saved-games-container {
    max-height: 70vh;
    overflow-y: auto;
}

.saved-games-loading {
    text-align: center;
    padding: 40px 20px;
}

.shimmer-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.shimmer-box {
    height: 80px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

.saved-games-header h3 {
    color: #2c5f2d;
    margin-bottom: 8px;
}

.saved-games-header p {
    color: #666;
    margin: 0;
}

.saved-games-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.saved-game-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.saved-game-card:hover {
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

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

.game-info h4 {
    color: #2c5f2d;
    margin: 0 0 4px 0;
    font-size: 18px;
}

.game-type {
    color: #666;
    font-size: 14px;
}

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

.score-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
}

.score-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.saved-game-progress {
    margin-bottom: 16px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    transition: width 0.3s ease;
}

.saved-game-details {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 14px;
}

.detail-item i {
    color: #4CAF50;
}

.saved-game-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.resume-btn {
    flex: 1;
    padding: 12px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.resume-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.delete-btn {
    padding: 12px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background: #da190b;
    transform: translateY(-1px);
}

.saved-games-empty .empty-state {
    text-align: center;
    padding: 60px 20px;
}

.saved-games-empty .empty-state i {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 20px;
}

.saved-games-empty .empty-state h3 {
    color: #2c5f2d;
    margin-bottom: 12px;
}

.saved-games-empty .empty-state p {
    color: #666;
    margin-bottom: 30px;
}

/* Dashboard Modal */
.dashboard-modal .modal-content {
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
}

.dashboard-header {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    border-radius: 12px 12px 0 0;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header * {
    color: white !important;
}

.dashboard-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 600;
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.dashboard-header .close-btn {
    color: white;
    font-size: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    transition: all 0.2s ease;
}

.dashboard-header .close-btn:hover {
    color: #a5d6a7;
    transform: scale(1.1);
}

.dashboard-body {
    padding: 30px;
    display: grid;
    gap: 30px;
}

/* Dashboard Section Styling */
.dashboard-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

/* Personal Records Section */
.records-section h3 {
    color: #2c5f2d;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.record-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.record-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.record-card.under-par {
    border-color: #4caf50;
    background: linear-gradient(135deg, #e8f5e8 0%, #ffffff 100%);
}

.record-card.under-par::before {
    background: #4caf50;
}

.record-card.even-par {
    border-color: #2196f3;
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
}

.record-card.even-par::before {
    background: #2196f3;
}

.record-card.over-par {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff3e0 0%, #ffffff 100%);
}

.record-card.over-par::before {
    background: #ff9800;
}

.record-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.record-icon {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.record-card.under-par .record-icon {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
}

.record-card.even-par .record-icon {
    background: linear-gradient(135deg, #2196f3, #42a5f5);
}

.record-card.over-par .record-icon {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
}

.record-info {
    flex: 1;
}

.record-course {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.record-score {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 4px;
    font-family: 'Roboto Slab', monospace;
}

.record-card.under-par .record-score {
    color: #2e7d32;
}

.record-card.even-par .record-score {
    color: #1976d2;
}

.record-card.over-par .record-score {
    color: #f57c00;
}

.record-details {
    font-size: 12px;
    color: #888;
}

.no-records {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-records i {
    font-size: 48px;
    color: #4caf50;
    margin-bottom: 16px;
    display: block;
}

.no-records h4 {
    margin: 0 0 8px 0;
    color: #2c5f2d;
}

.no-records p {
    margin: 0;
    font-size: 14px;
}
}

.dashboard-section h3 {
    margin: 0 0 20px 0;
    color: #1b5e20;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 600;
}

/* Profile Section */
.profile-card {
    display: flex;
    gap: 25px;
    align-items: center;
    padding: 25px 30px;
}

.profile-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-left: 10px;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.profile-avatar.has-image img {
    display: block;
}

.profile-initial {
    font-size: 2rem;
    font-weight: bold;
    color: white;
}

.profile-info h3 {
    margin: 0 0 8px 0;
    color: #1b5e20;
    font-size: 1.6rem;
    text-align: left;
}

.profile-info p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 1rem;
}

.profile-stats {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

.stat-item i {
    color: #4CAF50;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #4CAF50;
}

.stat-card.best-score {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-color: #ffc107;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.best-score .stat-icon {
    background: linear-gradient(135deg, #ffc107, #e0a800);
}

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

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #1b5e20;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Achievements Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.achievement {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement.unlocked {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #f8fff8, #ffffff);
}

.achievement.unlocked::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-top: 20px solid #4CAF50;
}

.achievement.unlocked::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: #ccc;
    display: block;
}

.achievement.unlocked .achievement-icon {
    color: #4CAF50;
    animation: pulse 2s infinite;
}

.achievement-title {
    font-weight: bold;
    color: #1b5e20;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.achievement-description {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.3;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Activity Feed */
.activity-feed {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.activity-item:hover {
    background-color: #f8f9fa;
}

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

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: #1b5e20;
    margin-bottom: 4px;
}

.activity-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 0.8rem;
    color: #999;
}

/* Performance Chart */
.chart-container {
    position: relative;
    height: 250px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-fallback {
    text-align: center;
    color: #666;
    font-style: italic;
}

#performance-chart {
    max-width: 100%;
    max-height: 100%;
}

/* Quick Actions */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

.action-btn.primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #4CAF50, #388e3c);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.action-btn.secondary:hover {
    background: linear-gradient(135deg, #45a049, #2e7d32);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Feedback Modal Styles */
.feedback-form {
    padding: 20px 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c5530;
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 0.85rem;
}

.form-select, .form-input, .form-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Roboto Slab', serif;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
}

.form-select:focus, .form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #228b22;
    box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 15px;
    display: block;
}

.empty-state h4 {
    margin: 0 0 10px 0;
    color: #1b5e20;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

/* Mobile Dashboard Responsiveness */
@media (max-width: 768px) {
    .dashboard-modal .modal-content {
        width: 95%;
        margin: 2.5%;
        max-height: 95vh;
    }
    
    .dashboard-body {
        padding: 20px;
        gap: 20px;
    }
    
    .dashboard-section {
        padding: 20px;
    }
    
    .profile-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
}


/* Share Button Styles */
.share-btn {
    background: #228b22;
    color: white !important;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.share-btn:hover {
    background: #1e7e1e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Social Share Modal Styles */
.share-options {
    margin: 20px 0;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.share-platform-btn {
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.share-platform-btn[data-platform="twitter"] {
    background: #1da1f2;
    color: white;
}

.share-platform-btn[data-platform="facebook"] {
    background: #1877f2;
    color: white;
}

.share-platform-btn[data-platform="linkedin"] {
    background: #0077b5;
    color: white;
}

.share-platform-btn[data-platform="reddit"] {
    background: #ff4500;
    color: white;
}

.share-platform-btn[data-platform="copy"] {
    background: #228b22;
    color: white;
}

.share-platform-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-platform-btn[data-platform="copy"]:hover {
    background: #1e7e1e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.share-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #2c5530;
}

.share-text {
    font-weight: 500;
    color: #333;
}

.share-customize {
    margin: 20px 0;
}

.share-customize label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c5530;
}

.share-customize textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
}

/* Analytics Dashboard Styles */
.analytics-modal .modal-content {
    max-width: 1000px;
    width: 95%;
    text-align: center;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.analytics-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #2c5530;
}

.analytics-card h3 {
    margin: 0 0 15px 0;
    color: #2c5530;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analytics-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #2c5530;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Practice Controls */
.practice-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 15px auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    max-width: 400px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.difficulty-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.difficulty-selector label {
    color: #2c5530;
    font-family: 'Roboto Slab', serif;
    font-weight: bold;
    text-shadow: none;
}

.difficulty-selector select {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-weight: bold;
    cursor: pointer;
}

.practice-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.practice-btn:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Navigation Controls */
.navigation-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px auto;
    max-width: 300px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.9);
    color: #2c5530;
    border: 2px solid rgba(76, 175, 80, 0.3);
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(76, 175, 80, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}


/* ==================== GROUP PLAY STYLES ==================== */

.group-play-modal .modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
}

.group-play-tabs {
    display: flex;
    border-bottom: 2px solid #e1e5e9;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: rgba(76, 175, 80, 0.05);
    color: #4CAF50;
}

.tab-btn.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
    background: rgba(76, 175, 80, 0.05);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.radio-label input,
.checkbox-label input {
    width: auto;
    margin: 0;
}

.tournament-lobby-modal .modal-content {
    max-width: 800px;
    max-height: 90vh;
    text-align: center;
}

.tournament-code {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

.lobby-info {
    margin-bottom: 1.5rem;
}

.tournament-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item .label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.status-waiting {
    color: #ff9800;
    font-weight: 600;
}

.status-active {
    color: #4CAF50;
    font-weight: 600;
}

.lobby-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.players-section h3,
.chat-section h3 {
    margin-bottom: 0.75rem;
    color: #333;
    font-size: 1.1rem;
}

.players-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 0.5rem;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    margin-bottom: 0.25rem;
}

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

.player-item.captain {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

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

.player-item .captain-badge {
    background: #4CAF50;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 12px;
    font-weight: 600;
}

.chat-messages {
    height: 150px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 0.75rem;
    background: #fafafa;
    margin-bottom: 0.75rem;
}

.chat-message {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.chat-message .username {
    font-weight: 600;
    color: #4CAF50;
}

.chat-message .timestamp {
    font-size: 0.75rem;
    color: #999;
    margin-left: 0.5rem;
}

.chat-message.system {
    color: #666;
    font-style: italic;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 0.9rem;
}

.lobby-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.tournament-list {
    max-height: 300px;
    overflow-y: auto;
}

.tournament-item {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tournament-item:hover {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.02);
}

.tournament-item h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.tournament-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.tournament-settings {
    font-size: 0.8rem;
    color: #888;
}

.loading-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Mobile responsiveness for group play */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .lobby-sections {
        grid-template-columns: 1fr;
    }
    
    .tournament-details {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lobby-actions {
        justify-content: center;
    }
}

/* Profile Management Modal Styles */
.profile-section {
    padding: 20px 0;
}

.current-profile {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c5530;
    margin-bottom: 5px;
}

.profile-email {
    font-size: 14px;
    color: #666;
}

.profile-form {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c5530;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Roboto Slab', serif;
    background: white;
    color: #333;
}

.form-group input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.avatar-selector {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.avatar-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    color: #666;
    font-size: 18px;
}

.avatar-option:hover {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    transform: scale(1.1);
}

.avatar-option.selected {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border-color: #2e7d32;
    transform: scale(1.05);
}

.profile-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
}

.profile-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

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

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

/* First-Time Setup Modal Styling */
.setup-intro {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(76, 175, 80, 0.2);
}

.setup-intro p {
    margin: 0;
    color: #2e7d32;
    font-size: 1.1rem;
    font-weight: 500;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-top: 5px;
}

.setup-actions {
    text-align: center;
    margin-top: 30px;
}

.setup-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

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

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

/* Fix ALL button styling to use consistent golf green theme */
.primary-btn, .modal-btn.primary, .multiplayer-btn, .start-course-btn, 
.nav-grid-btn, .nav-grid-btn.primary-action, .nav-grid-btn.secondary-action,
.course-help-btn, .submit-btn, #submit-btn {
    background: linear-gradient(135deg, #4caf50, #388e3c) !important;
    color: white !important;
    border: none;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3) !important;
}

.primary-btn:hover, .modal-btn.primary:hover, .multiplayer-btn:hover, 
.start-course-btn:hover, .nav-grid-btn:hover, .nav-grid-btn.primary-action:hover,
.nav-grid-btn.secondary-action:hover, .course-help-btn:hover,
.submit-btn:hover, #submit-btn:hover {
    background: linear-gradient(135deg, #66bb6a, #4caf50) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4) !important;
}

/* Secondary buttons stay green but lighter */
.secondary-btn, .modal-btn.secondary, .nav-grid-btn.secondary-action {
    background: linear-gradient(135deg, #81c784, #a5d6a7) !important;
    color: #1b5e20 !important;
    border: 2px solid #4caf50;
}

.secondary-btn:hover, .modal-btn.secondary:hover, .nav-grid-btn.secondary-action:hover {
    background: linear-gradient(135deg, #66bb6a, #81c784) !important;
    color: white !important;
}

/* Daily Challenge Modal Styles */
.challenge-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Modal Actions Layout - Horizontal Button Layout */
.modal-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 20px !important;
    flex-wrap: wrap !important;
}

/* Final Scorecard Buttons - Golf Theme */
#final-scorecard-leaderboard-btn, #final-scorecard-share-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049) !important;
    border: none !important;
    color: white !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3) !important;
    flex: 1 !important;
    max-width: 160px !important;
    min-width: 140px !important;
    font-size: 0.9rem !important;
    justify-content: center !important;
}

#final-scorecard-leaderboard-btn:hover, #final-scorecard-share-btn:hover {
    background: linear-gradient(135deg, #45a049, #388e3c) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4) !important;
}

.challenge-actions .nav-grid-btn {
    flex: 0 1 auto;
    min-width: 140px;
    max-width: 180px;
    padding: 10px 16px;
    font-size: 0.9rem;
}

.challenge-section {
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.challenge-intro {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.challenge-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.challenge-details h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: #2e7d32;
}

.challenge-details p {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 16px;
}

.challenge-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f57f17;
    font-weight: 600;
}

.challenge-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
}

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

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #2e7d32;
}

.stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.leaderboard-tabs {
    display: flex;
    gap: 8px;
}

.leaderboard-tabs .tab-btn {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.leaderboard-tabs .tab-btn.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #4CAF50;
}

.leaderboard-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Removed conflicting flex layout - using grid layout above */

.leaderboard-entry.current-user {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
}

.leaderboard-entry:last-child {
    margin-bottom: 0;
}

.leaderboard-entry .player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.leaderboard-entry .player-avatar {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 12px;
    font-weight: bold;
}

.leaderboard-entry .player-name {
    font-weight: 600;
    color: #1b5e20;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-rank {
    width: 24px;
    text-align: center;
    font-weight: bold;
    color: #4CAF50;
}

.player-name {
    font-weight: 500;
    color: #333;
}

.player-score {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.score-badge {
    background: #2e7d32;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 12px;
}

.score-badge.over-par {
    background: #d32f2f;
}

.score-badge.under-par {
    background: #1976d2;
}

/* Mobile responsiveness for daily challenge */
@media (max-width: 600px) {
    .challenge-intro {
        flex-direction: column;
        text-align: center;
    }
    
    .challenge-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .leaderboard-controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
}

/* Achievement System Styles */
.achievement-modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
}

.achievement-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
    gap: 0.5rem;
}

.achievement-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.achievement-tab.active {
    color: #16a34a;
    border-bottom-color: #16a34a;
    background: #f0f9f4;
}

.achievement-tab:hover:not(.active) {
    color: #374151;
    background: #f9fafb;
}

.achievement-tab-content {
    display: none;
}

.achievement-tab-content.active {
    display: block;
}

.achievement-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

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

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #16a34a;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 0 1rem;
}

.achievement-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
}

.achievement-item:hover {
    border-color: #16a34a;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.1);
}

.achievement-item.unlocked {
    border-color: #16a34a;
    background: linear-gradient(135deg, #f0f9f4 0%, #dcfce7 100%);
}

.achievement-item.unlocked .achievement-icon {
    color: #16a34a;
}

.achievement-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.achievement-icon {
    font-size: 1.5rem;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.achievement-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.achievement-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0.5rem 0;
}

.achievement-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.achievement-tier {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.achievement-tier.bronze {
    background: #f59e0b;
    color: white;
}

.achievement-tier.silver {
    background: #6b7280;
    color: white;
}

.achievement-tier.gold {
    background: #eab308;
    color: white;
}

.achievement-tier.platinum {
    background: #8b5cf6;
    color: white;
}

.achievement-points {
    color: #16a34a;
    font-weight: 600;
    font-size: 0.875rem;
}

.achievement-progress {
    margin-top: 0.75rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
}

.achievement-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.achievement-placeholder-icon {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.achievement-placeholder p {
    margin: 0.5rem 0;
}

.achievement-placeholder .small {
    font-size: 0.875rem;
    color: #9ca3af;
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.loading-spinner i {
    font-size: 2rem;
    color: #16a34a;
    margin-bottom: 1rem;
}

.category-filter {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #6b7280;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn.active {
    background: #16a34a;
    color: white;
    border-color: #16a34a;
}

.category-btn:hover:not(.active) {
    border-color: #16a34a;
    color: #16a34a;
}

/* Achievement Notification Popup */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    width: 320px;
    background: white;
    border: 2px solid #16a34a;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.achievement-notification:not(.hidden) {
    transform: translateX(0);
}

.achievement-notification-content {
    padding: 1rem;
}

.achievement-notification-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.achievement-notification-icon {
    font-size: 1.5rem;
    color: #eab308;
    animation: achievement-pulse 1s ease-in-out infinite alternate;
}

@keyframes achievement-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.achievement-notification-title {
    font-weight: 600;
    color: #16a34a;
    font-size: 1rem;
}

.achievement-notification-body h3 {
    margin: 0 0 0.5rem 0;
    color: #374151;
    font-size: 1.1rem;
}

.achievement-notification-body p {
    margin: 0 0 0.75rem 0;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.4;
}

.achievement-notification-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.achievement-notification .achievement-tier {
    font-size: 0.75rem;
}

.achievement-notification .achievement-points {
    font-weight: 600;
    color: #16a34a;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .achievement-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .achievements-list {
        grid-template-columns: 1fr;
        padding: 0 0.5rem;
    }
    
    .achievement-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .achievement-tabs {
        flex-direction: column;
    }
    
    .achievement-tab {
        flex: none;
        padding: 0.5rem;
    }
    
    .category-filter {
        gap: 0.25rem;
    }
    
    .category-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .achievement-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}



/* Leaderboard Dropdown Styles */
.leaderboard-controls {
    margin-top: 10px;
}

.leaderboard-dropdown {
    background: white;
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    color: #2c5530;
    cursor: pointer;
    outline: none;
    font-weight: 500;
    width: 200px;
}

.leaderboard-dropdown:hover {
    background: rgba(76, 175, 80, 0.1);
}

.leaderboard-dropdown:focus {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

/* Daily Challenge Start Modal Styles */
.challenge-intro {
    text-align: center;
    margin-bottom: 30px;
}

.challenge-number h3 {
    margin: 0 0 5px 0;
    color: #2e7d32;
    font-size: 1.4em;
}

.challenge-number p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 0.95em;
}

.challenge-rules {
    margin: 20px 0;
    text-align: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2e7d32;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
    clear: both;
    float: none !important;
}

.challenge-rules p {
    margin: 10px 0 0 0;
    color: #555;
    line-height: 1.5;
}

/* Ensure proper vertical flow in the modal body */
#daily-challenge-start-modal .modal-body {
    display: block;
    overflow: visible;
}

#daily-challenge-start-modal .challenge-intro {
    display: block;
    width: 100%;
}

.challenge-rules h4,
.timer-explanation h4,
.challenge-benefits h4 {
    margin: 0 0 10px 0;
    color: #2e7d32;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.challenge-rules ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
    list-style-type: disc;
}

.challenge-rules li {
    margin: 8px 0;
    line-height: 1.4;
}

.timer-explanation p,
.challenge-benefits p {
    margin: 0;
    line-height: 1.5;
    color: #444;
}

.challenge-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.secondary-btn {
    background: #f5f5f5;
    color: #666;
    border: 2px solid #ddd;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.secondary-btn:hover {
    background: #e8e8e8;
    border-color: #bbb;
    transform: translateY(-1px);
}
