﻿/* Base Theme Variables */
:root {
    /* Light Mode */
    --light-bg: #f8f9fa;
    --light-surface: #ffffff;
    --light-text: #2c3e50;
    --light-text-secondary: #526b84;
    --light-border: rgba(0, 0, 0, 0.125);
    --light-shadow: rgba(0, 0, 0, 0.1);

    /* Dark Mode */
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --dark-text: #e2e8f0;
    --dark-text-secondary: #94a3b8;
    --dark-border: rgba(255, 255, 255, 0.1);
    --dark-shadow: rgba(0, 0, 0, 0.3);
}

.registration-alert {
    position: relative;
    overflow: hidden;
    border: none;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure all text in registration alerts has proper contrast */
.registration-alert .event-info {
    /* Color removed to allow inline styles to work */
}

.registration-alert .event-detail-item {
    /* Color removed to allow inline styles to work */
}

.registration-alert .event-detail-text {
    /* Color removed to allow inline styles to work */
}

.registration-alert h5 {
    /* Color removed to allow inline styles to work */
    font-weight: 600;
}

.registration-alert .background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: none;
    object-position: center;
    background-size: auto;
    background-repeat: repeat;
    opacity: 0.15;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.registration-alert:hover {
    transform: translateY(-2px) scale(1.005);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.registration-alert .alert-content {
    position: relative;
    z-index: 2;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.registration-alert .league-image {
    height: 120px;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.registration-alert:hover .league-image {
    transform: scale(1.02);
}

.registration-alert .event-info {
    flex-grow: 1;
    min-width: 0; /* Enables text truncation */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
}

.registration-alert .theme-name {
    font-style: italic;
    font-weight: 500;
    opacity: 0.9;
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.registration-alert .league-description {
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 300;
    max-width: 65ch; /* Optimal reading length */
    margin-top: 0.25rem;
    margin: 0 auto;
}

.registration-alert .background-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    height: 100% !important;
    background-repeat: repeat !important;
    background-size: auto !important;
    background-position: center center !important;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
}

.registration-alert:hover .background-image {
    opacity: 0.2;
}

/* Ensure pattern-bg class is always properly applied */
.pattern-bg {
    background-repeat: repeat !important;
    background-size: auto !important;
    background-position: center center !important;
}

.registration-alert .register-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
    font-weight: 500;
    flex-shrink: 0;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.registration-alert .register-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.registration-alert h5 {
    font-weight: 600;
    font-size: 3.25rem;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.registration-alert .event-details {
    font-size: 0.9rem;
    opacity: 0.9;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.registration-alert .event-details span {
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.registration-alert .badge {
    padding: 0.5em 1em;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 992px) {
    .registration-alert .alert-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
        gap: 1.5rem;
    }

    .registration-alert .league-image {
        width: 100%;
        max-width: 300px;
        height: auto;
        margin: 0 auto;
    }

    .registration-alert .event-info {
        width: 100%;
    }

    .registration-alert .event-details {
        justify-content: center;
        flex-wrap: wrap;
    }

    .registration-alert .league-description {
        max-width: 100%;
        text-align: center;
        margin: 1rem auto;
    }

    .registration-alert .register-btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Further optimize for smaller screens */
@media (max-width: 576px) {
    .registration-alert {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .registration-alert .alert-content {
        padding: 0.75rem;
        gap: 1rem;
    }

    .registration-alert .league-image {
        max-width: 250px;
    }

    .registration-alert .event-details {
        flex-direction: column;
        gap: 0.5rem;
    }

    .registration-alert .event-details span {
        justify-content: center;
    }

    .registration-alert h5 {
        font-size: 1.1rem;
    }

    .registration-alert .theme-name {
        font-size: 0.95rem;
    }
}

/* Hero Section Enhancements */
.hero-section {
    background: var(--light-bg);
    border-radius: 20px;
    padding: 3rem 0;
    margin: 2rem 0 4rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hero-image-container {
    position: relative;
    perspective: 1000px;
}

.hero-image {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 383px;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--light-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-image:hover {
    transform: translateY(-5px) rotateY(5deg);
    box-shadow: 0 15px 40px var(--light-shadow);
}

.hero-content h1 {
    color: var(--light-text);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-lead {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--light-text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Enhanced Features List */
.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--light-surface);
    transition: all 0.3s ease;
    border: 1px solid var(--light-border);
}

.feature-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px var(--light-shadow);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.2rem;
    background: var(--light-bg);
    transition: all 0.3s ease;
}

.feature-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--light-text);
}

/* Course Contribution Card */
.course-contribution {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.contribution-content {
    position: relative;
    z-index: 2;
}

.contribution-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 100%;
    background: linear-gradient(45deg, transparent 48%, rgba(255, 255, 255, 0.1) 50%, transparent 52%);
    background-size: 20px 20px;
    opacity: 0.6;
    animation: patternMove 20s linear infinite;
}

/* Amount Styling */
.contribution-amount-container {
    margin: 1rem 0;
}

.contribution-amount {
    font-family: 'Roboto Mono', monospace; /* Match the monospace font */
    font-size: clamp(2rem, 5vw, 3rem); /* Responsive font size */
    font-weight: 700;
    color: #2563eb; /* Bright blue for emphasis */
    text-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
    margin: 0.5rem 0;
    transition: color 0.3s ease, text-shadow 0.3s ease;

    /* Add the glowing animation */
    animation: valueGlow 2s ease-in-out infinite alternate;
}

/* Keep existing glow animation or add if missing */
@keyframes valueGlow {
    from {
        text-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
    }
    to {
        text-shadow: 0 0 20px rgba(37, 99, 235, 0.6);
    }
}

.btn,
.card a {
    position: relative;
    z-index: 1;
}

/* Add subtle text shadow for better readability on varying backgrounds */
.card-footer .btn,
.card-footer a {
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* Dark mode link and button enhancements */

[data-bs-theme="dark"] {
    .contribution-amount {
        color: var(--primary); /* Uses theme primary for dark mode */
        text-shadow: 0 0 10px rgba(var(--theme-primary-rgb, 96, 165, 250), 0.3);
    }

    @keyframes valueGlow {
        from {
            text-shadow: 0 0 10px rgba(var(--theme-primary-rgb, 96, 165, 250), 0.3);
        }
        to {
            text-shadow: 0 0 20px rgba(var(--theme-primary-rgb, 96, 165, 250), 0.6);
        }
    }

    /* Improve button contrast */

    .btn-outline-secondary {
        border-color: var(--primary);
        background: whitesmoke;

    }

    .btn-outline-secondary:hover {
        background-color: rgba(var(--theme-primary-rgb, 96, 165, 250), 0.1);
        border-color: var(--primary-hover, var(--primary));
    }

    /* Specific fixes for league card links */

    .league-card .card-footer a,
    .league-card .btn-link {
        color: var(--primary);
        text-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
    }

    .league-card .card-footer a:hover,
    .league-card .btn-link:hover {
        color: var(--primary-hover, var(--primary));
        text-decoration: underline;
    }

    /* View League Info button enhancement */

    .btn-view-league {
        background-color: rgba(var(--theme-primary-rgb, 96, 165, 250), 0.1);
        border: 1px solid var(--primary);
        color: var(--primary);
    }

    .btn-view-league:hover {
        background-color: rgba(var(--theme-primary-rgb, 96, 165, 250), 0.2);
        color: var(--primary-hover, var(--primary));
        border-color: var(--primary-hover, var(--primary));
    }

    /* Leaderboard and recap links */

    .view-leaderboard,
    .view-recap {
        background-color: rgba(var(--theme-primary-rgb, 96, 165, 250), 0.05);
        border: 1px solid rgba(var(--theme-primary-rgb, 96, 165, 250), 0.2);
        color: var(--primary);
        padding: 0.75rem;
        border-radius: 8px;
        display: block;
        text-align: center;
        margin: 0.5rem 0;
        transition: all 0.2s ease;
    }

    .view-leaderboard:hover,
    .view-recap:hover {
        background-color: rgba(var(--theme-primary-rgb, 96, 165, 250), 0.1);
        border-color: rgba(var(--theme-primary-rgb, 96, 165, 250), 0.3);
        color: var(--primary-hover, var(--primary));
        text-decoration: none;
        transform: translateY(-1px);
    }
}


/* Accessibility - Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    .contribution-amount {
        animation: none;
    }
}

/* Enhanced contribution heading layout */
.contribution-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.contribution-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
}

/* Enhance the text content layout */
.contribution-text {
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 1rem;
    color: var(--light-text-secondary);
}

/* Dark Mode Styles */
[data-bs-theme="dark"] {
    .hero-section {
        background: var(--dark-bg);
    }

    .hero-content h1 {
        color: var(--dark-text);
    }

    .hero-lead {
        color: var(--dark-text-secondary);
    }

    .feature-item {
        background: var(--dark-surface);
        border-color: var(--dark-border);
    }

    .feature-icon {
        background: rgba(255, 255, 255, 0.1);
        color: var(--dark-text);
    }

    .feature-text {
        color: var(--dark-text);
    }

    .course-contribution {
        background: linear-gradient(135deg, #1e293b, #2d3748);
    }

    .contribution-heading {
        color: var(--dark-text);
    }

    .contribution-amount {
        color: var(--primary);
    }

    .contribution-text {
        color: var(--dark-text-secondary);
    }
}

/* League Card Enhancements */
.league-card {
    transition: all 0.3s ease;
}

.league-card:hover {
    transform: translateY(-5px);
}

.league-header {
    transition: background 0.3s ease;
}

.card {
    background: var(--light-surface);
    border: 1px solid var(--light-border);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px var(--light-shadow);
}

.league-info-section {
    --info-primary: #1a365d;
    --info-surface: #ffffff;
    --info-border: rgba(0, 0, 0, 0.08);
    --info-shadow: rgba(0, 0, 0, 0.1);
    --info-hover: rgba(0, 0, 0, 0.03);
    --info-text: #2c3e50;
    --info-text-secondary: #64748b;

    padding: 4rem 0;
    background: linear-gradient(
            to bottom,
            transparent,
            rgba(0, 0, 0, 0.02)
    );
}

.league-info-section h2 {
    color: var(--info-primary);
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

.league-info-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--info-primary);
    border-radius: 2px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.info-card {
    background: var(--info-surface);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid var(--info-border);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--info-shadow);
    background: var(--info-hover);
}

.info-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--info-primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.info-card:hover .info-icon {
    transform: scale(1.1) rotate(5deg);
}

.info-content h3 {
    color: var(--info-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.info-content p {
    color: var(--info-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* League Card Base */
.league-card {
    --card-radius: 16px;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --card-border: rgba(0, 0, 0, 0.08);
    --card-text: #2c3e50;
    --card-text-secondary: #64748b;
    margin-bottom: 2rem;
}

.league-card .card {
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    background: var(--light-surface, #ffffff);
}

.league-card .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px var(--card-shadow);
}

/* League Header */
.league-header {
    padding: 1.5rem;
    color: #E2E2E2;
    position: relative;
    overflow: hidden;
    border-top-left-radius: var(--card-radius);
    border-top-right-radius: var(--card-radius);
}

.league-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 70%);
    pointer-events: none;
}

.league-day-start {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.day-badge, .start-type-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.day-badge:hover, .start-type-badge:hover {
    transform: translateY(-2px);
}

.league-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1rem 0;
    padding-bottom: 0.75rem;
    position: relative;
    text-align: center;
}

/* Theme Container */
.theme-container {
    text-align: center;
    padding-top: 0.5rem;
}

.week-label {
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.theme-pill {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.theme-pill:hover {
    transform: translateY(-2px);
}

/* Card Image */
.card-img-top {
    height: 270.664px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Card Body */
.card-body {
    padding: 1.5rem;
}

.badge-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.card-text {
    color: var(--card-text);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.card-text strong {
    color: var(--card-text);
    font-weight: 600;
}

/* Card Footer */
.card-footer {
    background: transparent;
    border-top: 1px solid var(--card-border);
    padding: 1.5rem;
}

.event-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.event-action-buttons .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.event-action-buttons .btn:hover {
    transform: translateY(-2px);
}

/* Dark Mode Support */
[data-bs-theme="dark"] {
    .league-card {
        --card-shadow: rgba(0, 0, 0, 0.3);
        --card-border: rgba(255, 255, 255, 0.1);
        --card-text: #e2e8f0;
        --card-text-secondary: #94a3b8;
    }

    .league-card .card {
        background: var(--dark-surface, #1e293b);
    }

    .card-footer {
        border-color: var(--card-border);
    }

    .event-action-buttons .btn-outline {
        border-color: var(--card-text);
        color: var(--card-text);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .league-day-start {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .start-type-badge {
        width: 100%;
    }

    .card-img-top {
        height: 180px;
    }

    .event-action-buttons {
        gap: 0.5rem;
    }

    .event-action-buttons .btn {
        padding: 0.625rem 1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .league-card .card,
    .card-img-top,
    .day-badge,
    .start-type-badge,
    .theme-pill,
    .event-action-buttons .btn {
        transition: none;
    }

    .league-card .card:hover,
    .card:hover .card-img-top,
    .day-badge:hover,
    .start-type-badge:hover,
    .theme-pill:hover,
    .event-action-buttons .btn:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .league-card {
        break-inside: avoid;
    }

    .league-header {
        background: none !important;
        color: #000 !important;
        border-bottom: 1px solid #000;
    }

    .day-badge, .start-type-badge {
        border: 1px solid #000;
        background: none !important;
    }

    .theme-pill {
        border: 1px solid #000;
        background: none !important;
        color: #000 !important;
    }

    .card-img-top {
        display: none;
    }

    .event-action-buttons {
        display: none;
    }

    .badge-status {
        border: 1px solid #000;
        color: #000 !important;
        background: none !important;
    }
}

/* Dark mode support */
[data-bs-theme="dark"] {
    .league-info-section {
        --info-primary: var(--primary);
        --info-surface: #1e293b;
        --info-border: rgba(255, 255, 255, 0.1);
        --info-shadow: rgba(0, 0, 0, 0.3);
        --info-hover: rgba(255, 255, 255, 0.03);
        --info-text: #e2e8f0;
        --info-text-secondary: #94a3b8;

        background: linear-gradient(
                to bottom,
                transparent,
                rgba(0, 0, 0, 0.1)
        );
    }

    .info-icon {
        background: #2563eb;
    }

}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .info-card,
    .info-card:hover,
    .info-icon {
        transition: none;
        transform: none;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .league-info-section {
        padding: 3rem 0;
    }

    .info-grid {
        gap: 1rem;
    }

    .info-card {
        padding: 1.5rem;
    }

    .info-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .info-content h3 {
        font-size: 1.1rem;
    }
}

/* Print styles */
@media print {
    .league-info-section {
        background: none;
    }

    .info-card {
        break-inside: avoid;
        border: 1px solid #000;
        box-shadow: none;
    }

    .cta-container {
        display: none;
    }
}

/* Animations */
@keyframes patternMove {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 100px 100px;
    }
}

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

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero-image:hover,
    .feature-item:hover,
    .league-card:hover,
    .card:hover {
        transform: none;
    }

    .contribution-pattern {
        animation: none;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
        margin: 1rem 0 2rem;
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .feature-item:hover {
        transform: none;
    }

    .card-img-top {
        height: 270.664px;
    }
}

/* Print Styles */
@media print {
    .hero-section {
        background: none !important;
        padding: 1rem 0;
        margin: 1rem 0;
    }

    .feature-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .course-contribution {
        background: none !important;
        border: 1px solid #000;
    }

    .contribution-pattern {
        display: none;
    }
}


/* Flippy Introduction Section Styles */
.flippy-intro-section {
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

.flippy-intro-section::before {
    content: '💬';
    position: absolute;
    right: -20px;
    top: -40px;
    font-size: 200px;
    opacity: 0.03;
    transform: rotate(15deg);
    pointer-events: none;
}

.flippy-intro-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.flippy-intro-content {
    display: flex;
    gap: 2rem;
    padding: 2rem;
}

.flippy-avatar-container {
    flex-shrink: 0;
    position: relative;
    width: 200px;
}

.flippy-avatar {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 3px solid white;
}

.flippy-quote-bubble {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #9333ea 0%, #db2777 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.flippy-message {
    flex-grow: 1;
}

.flippy-message h3 {
    color: #2d3748;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.flippy-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #4a5568;
}

.flippy-text p {
    margin-bottom: 1rem;
}

.flippy-text em {
    color: #718096;
    font-style: italic;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .flippy-intro-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .flippy-avatar-container {
        width: 150px;
    }

    .flippy-avatar {
        width: 150px;
        height: 150px;
    }
}

/* Dark Mode Support */
[data-bs-theme="dark"] {
    .flippy-intro-section {
        background: #1a1a1a;
    }

    .flippy-intro-card {
        background: #2d3748;
    }

    .flippy-message h3 {
        color: #e2e8f0;
        border-bottom-color: #4a5568;
    }

    .flippy-text {
        color: #e2e8f0;
    }

    .flippy-text em {
        color: #a0aec0;
    }
}


/* Section Header Styles */
.section-header {
    position: relative;
    padding-bottom: 1rem;
}

.section-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--light-text, #2c3e50);
}

.section-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    color: var(--light-text-secondary, #64748b);
}

/* Dark Mode Enhancements */
[data-bs-theme="dark"] {
    .section-header h2 {
        color: var(--dark-text, #e2e8f0);
    }

    .section-header p {
        color: var(--dark-text-secondary, #94a3b8);
    }

    /* Replace default text-muted class styling in dark mode */

    .section-header .text-muted {
        color: rgba(255, 255, 255, 0.7) !important;
    }
}

/* High Contrast Mode Support */
@media (forced-colors: active) {
    .section-header h2,
    .section-header p,
    .section-header .text-muted {
        color: CanvasText;
    }
}


.current-ctp-image {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.current-ctp-image:hover {
    transform: scale(1.05);
}

.current-ctp-holder {
    transition: transform 0.2s ease;
}

.current-ctp-holder:hover {
    transform: translateY(-1px);
}

/* Dark mode support */
[data-bs-theme="dark"] {
    .compact-ctp {
        background: #1e293b;
        color: #fff;
    }

    .compact-ctp .text-muted {
        color: lightgray !important;
    }

    .current-ctp-holder {
        background: rgba(255, 255, 255, 0.05) !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .current-ctp-image,
    .current-ctp-holder {
        transition: none;
    }
}

/* League card responsive layout - removed restrictive max-width */
@media (min-width: 576px) {
    .league-card-wrapper {
        /* Let Bootstrap's col classes handle the width */
    }
}

@media (min-width: 1200px) {
    .league-card-wrapper {
        /* Let Bootstrap's col classes handle the width */
    }
}

/* Ensure cards maintain minimum width for readability */
.league-card .card {
    min-width: 280px;
    height: 100%;
}

/* Add improved spacing for better visual hierarchy */
.league-card .card-body {
    padding: 1.5rem;
}

.current-series-module {
    --widget-radius: 1.25rem;
    --widget-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --widget-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* 
      The background gradient is anchored using your existing 
      color variables; adjust to taste.
    */
    background: linear-gradient(135deg, var(--info) 0%, var(--surface-2) 100%);
    border-radius: var(--widget-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--widget-shadow);
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.current-series-module:hover {
    transform: translateY(-4px);
    box-shadow: var(--widget-shadow-hover);
}

/* Shimmer animation for loading state */
@keyframes shimmer {
    0% {
        background-position: -500px 0;
    }
    100% {
        background-position: 500px 0;
    }
}

/* 
  When the .loading class is applied, 
  create the shimmer effect on top of the gradient. 
*/
.current-series-module.loading {
    position: relative;
    color: transparent; /* Hide text while shimmering */

    /* 
      We use a pseudo-element to animate the shimmer 
      so the module’s gradient background remains visible.
    */
}

.current-series-module.loading::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to right,
            rgba(255, 255, 255, 0.06) 0%,
            rgba(255, 255, 255, 0.15) 20%,
            rgba(255, 255, 255, 0.06) 40%,
            rgba(255, 255, 255, 0.06) 100%
    );
    background-size: 800px 100%;
    animation: shimmer 2s infinite linear;
    z-index: 9;
    pointer-events: none;
}

/* Series image container remains the same, but let’s add a subtle hover scale */
.series-image-container {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.series-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.series-image:hover {
    transform: scale(1.03);
}

/* Content area styles */
.series-content {
    position: relative; /* So we can layer the “Next Series” pop */
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Adjust headings for better readability on the gradient */
.series-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

/* Example badge styling for division: slight glow effect */
.division-badge {
    background-color: var(--surface-2);
    color: var(--text-primary);
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

/* Standing details: give a card-like feel */
.standing-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--surface-2);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
}

.position {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--info);
}

.position-number {
    margin-right: 0.25rem;
}

.stats {
    display: flex;
    gap: 1rem;
}

.stat-item i {
    color: var(--info);
    margin-right: 0.25rem;
    font-size: 1rem;
}

.stat-item span {
    color: var(--text-secondary);
}

/* Series description text */
.series-description p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.series-dates {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* “Next Series” pop-out style */
.upcoming-series {
    position: relative;
    background: var(--surface-1);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease;
}

.upcoming-series:hover {
    transform: translateY(-2px);
}

.upcoming-series .fas.fa-calendar-plus {
    color: var(--warning); /* highlight icon in a warm color */
}

.upcoming-series span {
    color: var(--text-primary);
    font-weight: 600;
    margin-right: 0.25rem;
}

.upcoming-series a {
    display: block;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0) 100%
    );
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.upcoming-series a:hover {
    background: linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 255, 255, 0) 100%
    );
    transform: translateY(-2px);
}

.upcoming-series a strong {
    color: var(--info);
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.upcoming-series a .text-muted {
    font-size: 0.875rem;
}

/* Bottom link styling */
.series-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    width: max-content;
    padding: 0.75rem 1.25rem;
    color: #fff !important;
    background-color: var(--info);
    font-weight: 600;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.series-link:hover {
    background-color: color-mix(in srgb, var(--info) 80%, white);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .standing-details {
        flex-direction: column;
        text-align: center;
    }

    .stats {
        flex-direction: column;
    }
}

/* Dark mode adjustments */
[data-bs-theme="dark"] {
    .current-series-module {
        background: linear-gradient(135deg, var(--info) 0%, var(--surface-2) 100%);
        box-shadow: var(--shadow);
    }

    .current-series-module.loading::before {
        background: linear-gradient(
                to right,
                rgba(255, 255, 255, 0.05) 0%,
                rgba(255, 255, 255, 0.12) 20%,
                rgba(255, 255, 255, 0.05) 40%,
                rgba(255, 255, 255, 0.05) 100%
        );
    }

    .upcoming-series {
        background: var(--surface-2);
        box-shadow: var(--shadow-sm);
    }

    .upcoming-series a {
        background: linear-gradient(
                135deg,
                rgba(255, 255, 255, 0.05) 0%,
                rgba(255, 255, 255, 0) 100%
        );
    }

    .upcoming-series a:hover {
        background: linear-gradient(
                135deg,
                rgba(255, 255, 255, 0.1) 0%,
                rgba(255, 255, 255, 0) 100%
        );
    }
}


.ace-pots-wrapper {
    display: flex;
    flex-direction: column;
    height: auto; /* Allow natural height */
}

.ace-pots-module {
    background: var(--gradient-primary, linear-gradient(135deg, #2c3e50 0%, #3498db 100%));
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ace-pots-module::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    transform: translate(50%, -50%);
}

.ace-pots-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pot-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.pot-item:hover {
    transform: translateX(8px);
    background: rgba(255, 255, 255, 0.15);
}

.pot-content {
    flex: 1;
    min-width: 0;
}

.pot-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.pot-header {
    flex: 1;
    min-width: 0;
}

.pot-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pot-progress {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.progress {
    background: rgba(255, 255, 255, 0.2);
}

.amount-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1c40f;
    white-space: nowrap;
}

.pot-info {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.pot-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    transition: all 0.3s ease;
}

.pot-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateX(4px);
}

.no-pots-message {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 1.1rem;
}

/* Dark theme support */
[data-bs-theme="dark"] {
    .ace-pots-module {
        background: linear-gradient(135deg, #1a2634 0%, #2c4864 100%);
    }

    .pot-item {
        background: rgba(255, 255, 255, 0.05);
    }

    .pot-item:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .progress {
        background: rgba(0, 0, 0, 0.2);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .pot-item,
    .pot-item:hover,
    .pot-link,
    .pot-link:hover {
        transition: none;
        transform: none;
    }
}

/* Platform Proof Section */
.platform-proof-section {
    margin: 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.1));
    border-bottom: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.1));
}

.proof-heading {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--theme-text-primary, #2c3e50);
}

.proof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.proof-stat {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--theme-accent, #3182ce);
    margin-bottom: 0.5rem;
    font-family: 'Roboto Mono', monospace;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--theme-text-primary, #2c3e50);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-detail {
    font-size: 0.8rem;
    color: var(--theme-text-secondary, #64748b);
    font-style: italic;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.trust-badges .badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--theme-surface-2, rgba(255, 255, 255, 0.9));
    border: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.1));
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--theme-text-primary, #2c3e50);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.trust-badges .badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.trust-badges .badge i {
    color: var(--theme-success, #10b981);
    font-size: 1rem;
}

/* Achievement Showcase */
.achievement-showcase {
    background: var(--theme-surface-1, #f8f9fa);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    border: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.1));
}

.achievement-showcase h3 {
    color: var(--theme-text-primary, #2c3e50);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.achievement-example {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.achievement-icon {
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.achievement-content {
    text-align: left;
    flex: 1;
}

.achievement-content h4 {
    color: var(--theme-text-primary, #2c3e50);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.achievement-content p {
    color: var(--theme-text-secondary, #64748b);
    line-height: 1.6;
    margin: 0;
}

.achievement-stat {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--theme-accent, #3182ce);
    margin: 0;
}

/* Success Story */
.success-story {
    background: var(--theme-surface-2, rgba(255, 255, 255, 0.9));
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--theme-accent, #3182ce);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.success-story blockquote {
    margin: 0;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--theme-text-primary, #2c3e50);
    line-height: 1.6;
}

.success-story cite {
    display: block;
    text-align: right;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--theme-text-secondary, #64748b);
    font-weight: 500;
    font-style: normal;
}

/* Featured Testimonial with Avatar */
.success-story--featured {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    border-left: none;
    border-top: 4px solid var(--theme-accent, #3182ce);
}

.success-story--featured .testimonial-avatar {
    margin-bottom: 1.25rem;
}

.success-story--featured .testimonial-avatar .player-avatar,
.success-story--featured .testimonial-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--theme-accent, #3182ce);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.success-story--featured blockquote {
    font-size: 1rem;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 0 1.25rem;
}

.success-story--featured .testimonial-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
}

.success-story--featured .testimonial-name,
.success-story--featured .testimonial-name a {
    font-weight: 600;
    font-size: 1rem;
    color: var(--theme-text-primary, #2c3e50);
    text-decoration: none;
}

.success-story--featured .testimonial-name a:hover {
    color: var(--theme-accent, #3182ce);
}

.success-story--featured .testimonial-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--theme-text-secondary, #64748b);
    flex-wrap: wrap;
    justify-content: center;
}

.success-story--featured .testimonial-separator {
    color: var(--theme-text-muted, #94a3b8);
}

/* Dark Mode Support */
[data-bs-theme="dark"] {
    .proof-heading {
        color: var(--theme-text-primary, #e2e8f0);
    }

    .stat-label {
        color: var(--theme-text-primary, #e2e8f0);
    }

    .stat-detail {
        color: var(--theme-text-secondary, #94a3b8);
    }

    .trust-badges .badge {
        background: var(--theme-surface-2, rgba(30, 41, 59, 0.9));
        color: var(--theme-text-primary, #e2e8f0);
        border-color: var(--theme-border-color, rgba(255, 255, 255, 0.1));
    }

    .achievement-showcase {
        background: var(--theme-surface-1, #1e293b);
        border-color: var(--theme-border-color, rgba(255, 255, 255, 0.1));
    }

    .achievement-showcase h3 {
        color: var(--theme-text-primary, #e2e8f0);
    }

    .achievement-content h4 {
        color: var(--theme-text-primary, #e2e8f0);
    }

    .achievement-content p {
        color: var(--theme-text-secondary, #94a3b8);
    }

    .success-story {
        background: var(--theme-surface-2, rgba(30, 41, 59, 0.9));
        border-left-color: var(--theme-accent, #60a5fa);
    }

    .success-story blockquote {
        color: var(--theme-text-primary, #e2e8f0);
    }

    .success-story cite {
        color: var(--theme-text-secondary, #94a3b8);
    }

    .success-story--featured .testimonial-name,
    .success-story--featured .testimonial-name a {
        color: var(--theme-text-primary, #e2e8f0);
    }

    .success-story--featured .testimonial-name a:hover {
        color: var(--theme-accent, #60a5fa);
    }

    .success-story--featured .testimonial-avatar .player-avatar,
    .success-story--featured .testimonial-avatar img {
        border-color: var(--theme-accent, #60a5fa);
    }
}

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

    .trust-badges {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .achievement-example {
        flex-direction: column;
        text-align: center;
    }

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

    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .proof-grid {
        grid-template-columns: 1fr;
    }

    .platform-proof-section {
        padding: 1.5rem 0;
    }

    .achievement-showcase {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
}

/* Event Detail Description Styling */
.event-detail-description {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 0.5rem;
    line-height: 1.3;
    text-align: center;
    font-style: normal;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    max-width: 100%;
    word-wrap: break-word;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Dark mode adjustments */
[data-bs-theme="dark"] {
    .event-detail-description {
        color: rgba(255, 255, 255, 0.75);
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .event-detail-description {
        font-size: 0.75rem;
        line-height: 1.2;
        padding: 0.4rem 0.6rem;
        margin-top: 0.4rem;
    }
}
