/* ==========================================================================
   Landing Page Styles (Public Homepage)
   ========================================================================== */

/* ==========================================================================
   Hero Section
   ========================================================================== */
.landing-hero {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFB 100%);
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-green) 0%, #10B981 100%);
}

.landing-hero__content {
    max-width: 800px;
    margin: 0 auto;
}

.landing-hero__title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
    line-height: 1.2;
    font-weight: 800;
}

.landing-hero__subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.landing-hero__cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

[data-theme="dark"] .landing-hero {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--secondary-bg) 100%);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.landing-btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.landing-btn--primary {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
}

.landing-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
}

.landing-btn--secondary {
    background: transparent;
    color: #16a34a;
    border: 2px solid #16a34a;
}

.landing-btn--secondary:hover {
    background: #f0fdf4;
}

[data-theme="dark"] .landing-btn--secondary:hover {
    background: var(--secondary-bg);
}

/* ==========================================================================
   Section Container
   ========================================================================== */
.landing-section {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 2rem;
    margin-bottom: 1rem;
}

.landing-section__header {
    text-align: center;
    margin-bottom: 2rem;
}

.landing-section__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.landing-section__subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Activity Feed
   ========================================================================== */
.landing-activity {
    display: grid;
    gap: 0.75rem;
}

.landing-activity__item {
    background: var(--secondary-bg);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}

.landing-activity__item:hover {
    transform: translateX(4px);
}

.landing-activity__item--highlight {
    border-left-color: var(--accent-green);
}

.landing-activity__content {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.landing-activity__user {
    font-weight: 700;
    color: #059669;
    text-decoration: none;
}

.landing-activity__score {
    font-weight: 700;
    color: #15803d;
}

.landing-activity__par {
    font-weight: 600;
    color: #6b7280;
}

.landing-activity__par--good {
    color: #16a34a;
}

.landing-activity__time {
    font-size: 0.9rem;
    color: #9ca3af;
}

.landing-activity__empty {
    text-align: center;
    padding: 2rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Community Stats
   ========================================================================== */
.landing-community {
    background: var(--secondary-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 1.5rem;
}

.landing-community__title {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 700;
}

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

.landing-stat {
    text-align: center;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.landing-stat:hover {
    transform: translateY(-2px);
}

.landing-stat__icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.landing-stat__value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-green);
    margin-bottom: 0.25rem;
}

.landing-stat__label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ==========================================================================
   Charts
   ========================================================================== */
.landing-charts {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.landing-chart {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
}

.landing-chart__title {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
}

[data-theme="dark"] .landing-chart {
    background: var(--card-bg);
}

/* ==========================================================================
   Popular Courses
   ========================================================================== */
.landing-courses__title {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.landing-courses__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.landing-courses__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: background 0.2s, border-color 0.2s;
}

.landing-courses__item:hover {
    background: rgba(5, 150, 105, 0.1);
    border-color: var(--accent-green);
}

[data-theme="dark"] .landing-courses__item {
    background: var(--primary-bg);
}

[data-theme="dark"] .landing-courses__item:hover {
    background: rgba(16, 185, 129, 0.15);
}

.landing-courses__name {
    font-weight: 600;
    color: var(--text-primary);
}

.landing-courses__count {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ==========================================================================
   Leaderboards
   ========================================================================== */
.landing-leaderboards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.landing-leaderboard {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.2s;
}

.landing-leaderboard:hover {
    transform: translateY(-2px);
}

.landing-leaderboard__course {
    background: linear-gradient(135deg, var(--accent-green) 0%, #15803d 100%);
    color: white;
    padding: 1rem;
    margin: 0;
    font-size: 1.1rem;
    text-align: center;
    font-weight: 700;
}

.landing-leaderboard__scores {
    padding: 1rem;
}

.landing-leaderboard__entry {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--secondary-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: background 0.2s;
}

.landing-leaderboard__entry:hover {
    background: rgba(5, 150, 105, 0.1);
}

.landing-leaderboard__entry:last-child {
    margin-bottom: 0;
}

.landing-leaderboard__entry--gold {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
}

[data-theme="dark"] .landing-leaderboard__entry--gold {
    background: linear-gradient(135deg, #78350f 0%, #451a03 100%);
    border-color: #d97706;
}

.landing-leaderboard__rank {
    font-size: 1.5rem;
    min-width: 40px;
    text-align: center;
}

.landing-leaderboard__player {
    flex: 1;
}

.landing-leaderboard__name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.landing-leaderboard__date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.landing-leaderboard__score-info {
    text-align: right;
}

.landing-leaderboard__score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-green);
    line-height: 1;
}

.landing-leaderboard__par {
    font-size: 0.9rem;
    color: var(--accent-green);
    font-weight: 600;
    margin-top: 0.15rem;
}

/* ==========================================================================
   Features Grid
   ========================================================================== */
.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.landing-feature {
    background: var(--secondary-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.landing-feature:hover {
    transform: translateY(-2px);
}

.landing-feature__icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.landing-feature__title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 700;
}

.landing-feature__text {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* ==========================================================================
   Stats Highlight
   ========================================================================== */
.landing-highlight {
    background: linear-gradient(135deg, var(--accent-green) 0%, #15803d 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.landing-highlight__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.landing-highlight__value {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.landing-highlight__label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.landing-cta {
    padding: 2rem;
    text-align: center;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 1rem;
}

.landing-cta__title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 800;
}

.landing-cta__text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Floating CTA - hidden by default on desktop */
.floating-cta-btn {
    display: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    /* Page container - tighter padding */
    .max-w-7xl.px-4 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-top: 0.5rem !important;
    }

    /* Hero - compact */
    .landing-hero {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
        border-radius: 8px;
    }

    .landing-hero__title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .landing-hero__subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
        line-height: 1.5;
    }

    .landing-hero__cta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .landing-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        text-align: center;
    }

    /* Sections - compact */
    .landing-section {
        padding: 1.25rem 1rem;
        margin-bottom: 0.75rem;
        border-radius: 8px;
    }

    .landing-section__header {
        margin-bottom: 1rem;
    }

    .landing-section__title {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .landing-section__subtitle {
        font-size: 0.85rem;
    }

    /* Activity feed - compact horizontal layout */
    .landing-activity {
        gap: 0.5rem;
    }

    .landing-activity__item {
        padding: 0.75rem;
        border-left-width: 3px;
        flex-direction: row;
        align-items: center;
    }

    .landing-activity__content {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .landing-activity__time {
        font-size: 0.75rem;
        white-space: nowrap;
        margin-left: 0.5rem;
    }

    .landing-activity__empty {
        padding: 1.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Community stats - compact 2x2 grid */
    .landing-community {
        padding: 1rem;
        margin-top: 1rem;
    }

    .landing-community__title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .landing-community__stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .landing-stat {
        padding: 0.75rem 0.5rem;
    }

    .landing-stat__icon {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .landing-stat__value {
        font-size: 1.35rem;
        margin-bottom: 0.15rem;
    }

    .landing-stat__label {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    /* Charts - compact */
    .landing-charts {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .landing-chart {
        padding: 0.75rem;
    }

    .landing-chart__title {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    /* Popular courses - compact */
    .landing-courses__title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .landing-courses__item {
        padding: 0.65rem 0.75rem;
    }

    .landing-courses__name {
        font-size: 0.85rem;
    }

    .landing-courses__count {
        font-size: 0.75rem;
    }

    /* Leaderboards - horizontal compact entries */
    .landing-leaderboards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .landing-leaderboard {
        border-radius: 8px;
    }

    .landing-leaderboard__course {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    .landing-leaderboard__scores {
        padding: 0.5rem;
    }

    .landing-leaderboard__entry {
        padding: 0.5rem;
        gap: 0.5rem;
        margin-bottom: 0.35rem;
    }

    .landing-leaderboard__rank {
        font-size: 1.1rem;
        min-width: 28px;
    }

    .landing-leaderboard__name {
        font-size: 0.85rem;
    }

    .landing-leaderboard__date {
        font-size: 0.7rem;
    }

    .landing-leaderboard__score {
        font-size: 1.2rem;
    }

    .landing-leaderboard__par {
        font-size: 0.75rem;
    }

    /* Features - 2 column compact grid */
    .landing-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .landing-feature {
        padding: 1rem 0.75rem;
    }

    .landing-feature__icon {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .landing-feature__title {
        font-size: 0.9rem;
        margin-bottom: 0.35rem;
    }

    .landing-feature__text {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    /* Stats highlight - compact horizontal */
    .landing-highlight {
        padding: 1.25rem 1rem;
        margin-bottom: 0.75rem;
        border-radius: 8px;
    }

    .landing-highlight__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .landing-highlight__value {
        font-size: 1.35rem;
        margin-bottom: 0.15rem;
    }

    .landing-highlight__label {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    /* CTA - compact */
    .landing-cta {
        padding: 1.5rem 1rem;
        margin-bottom: 0.75rem;
        border-radius: 8px;
    }

    .landing-cta__title {
        font-size: 1.35rem;
        margin-bottom: 0.5rem;
    }

    .landing-cta__text {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }

    /* Floating CTA button for mobile */
    .floating-cta-btn {
        display: flex;
        position: fixed;
        bottom: 5rem;
        right: 1rem;
        width: 56px;
        height: 56px;
        background: linear-gradient(135deg, var(--accent-green) 0%, #10B981 100%);
        color: white;
        border-radius: 50%;
        box-shadow: 0 4px 16px rgba(16, 163, 74, 0.4);
        z-index: 100;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        text-decoration: none;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .floating-cta-btn:hover,
    .floating-cta-btn:active {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(16, 163, 74, 0.5);
        color: white;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .landing-hero__title {
        font-size: 1.5rem;
    }

    .landing-hero__subtitle {
        font-size: 0.875rem;
    }

    /* Single column features on very small screens */
    .landing-features {
        grid-template-columns: 1fr;
    }

    .landing-feature {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.875rem;
    }

    .landing-feature__icon {
        font-size: 1.5rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .landing-feature__content {
        flex: 1;
    }

    .landing-feature__title {
        margin-bottom: 0.25rem;
    }

    /* Stack highlight stats vertically */
    .landing-highlight__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
