/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    /* Light Mode Palette */
    --color-canvas: #FFFFFF;
    /* White */
    --color-glass: rgba(255, 255, 255, 0.6);
    --color-text-primary: #003F91;
    /* French Blue */
    --color-text-secondary: #003F91;
    /* French Blue (for consistency/contrast) or maybe slight transparency */
    --color-accent: #003F91;
    /* French Blue as strong accent */
    --color-accent-light: #5DA9E9;
    /* Cool Sky */
    --color-highlight: #6D326D;
    /* Velvet Purple */
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-canvas);
}

::-webkit-scrollbar-thumb {
    background: var(--color-accent-light);
    border-radius: 10px;
    border: 2px solid var(--color-canvas);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent-light) var(--color-canvas);
}

body {
    font-family: "SF Pro Display", "SF Pro Text", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-x: hidden;
    /* padding-bottom removed to fix page length issue */
    background-color: var(--color-canvas);
    /* Default Light Background */
}

/* Fixed Background Layers */
/* Fixed Background Layers */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dot Grid Pattern */
    /* background-image removed */
    /* background-size removed */
    opacity: 0.15;
    /* Subtle visibility */
    z-index: -2;

    /* Fade out the dots towards the bottom */
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* body::after removed */

body.gradient-active::before {
    opacity: 1;
}

body.gradient-active::after {
    /* Animate from 0 to avoid pop */
    animation: bgFade 15s ease-in-out infinite alternate;
}

@keyframes bgFade {
    0% {
        opacity: 0;
    }

    20% {
        opacity: 0.2;
    }

    100% {
        opacity: 0.6;
    }
}

/* Header - Liquid Glass */
/* Header - Liquid Glass */
header {
    background: rgba(255, 255, 255, 0.2);
    /* Lighter glass */
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--color-text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 1.7em;
    width: auto;
    display: block;
    transform: translateY(-2px);
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    color: var(--color-text-primary);
    /* Use primary text color */
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0.7;
    position: relative;
    /* For Pseudo-elements if needed later */
}

nav a:hover {
    opacity: 1;
    color: var(--color-highlight);
    /* Highlight on hover */
    transform: translateY(-2px);
    /* Slight lift */
}

/* Login Button Specific */
.login-btn {
    font-weight: 700;
    /* Bold */
}

/* Main Content */
main {
    flex: 1;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    position: relative;
    /* For absolute positioning of button */
}

.hero h1 {
    color: var(--color-text-primary);
    font-size: 8rem;
    font-weight: 400;
    margin-bottom: 0;
    /* Reset margin */
    line-height: 1.1;
    transform: scale(1.4);
    /* Animation start state */
    will-change: transform;
    position: relative;
    z-index: 2;
    /* Ensure text is above ripple */
}

/* Wrappers */
.ripple-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    /* Gradient Ring: Transparent center -> Faded Color -> Transparent outer */
    background: radial-gradient(circle, transparent 20%, rgba(93, 169, 233, 0.6) 50%, transparent 80%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    z-index: 1;
    /* Below text */
    pointer-events: none;
}

.ripple-effect.active {
    /* Start fast, ease out slowly using cubic-bezier */
    animation: rippleExpand 5s cubic-bezier(0.05, 0.7, 0.1, 1) forwards;
}

@keyframes rippleExpand {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(300);
        /* Expand far beyond screen */
        opacity: 0;
    }
}

.club-wrap,
.scout-wrap {
    color: var(--color-text-primary);
    /* Dark Blue on Light */
}

/* Individual characters */
.hero h1 span span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    will-change: transform, opacity;
}

/* Discover Button */
.discover-btn {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    opacity: 0;

    /* Standard transition for all properties including the entrance and hover */
    transition:
        opacity 1s ease-out,
        transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
        background 0.3s ease,
        box-shadow 0.3s ease,
        backdrop-filter 0.3s ease,
        color 0.3s ease;

    padding: 1rem 3.5rem;

    /* "Liquid Glass" implementation */
    background: rgba(0, 63, 145, 0.1);
    /* Slight French Blue tint */
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(0, 63, 145, 0.2);
    border-radius: 9999px;

    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;

    box-shadow: 0 10px 30px rgba(0, 63, 145, 0.15);
    cursor: pointer;
    z-index: 20;
    /* Boosted z-index */
}

/* JS-triggered entrance state */
.discover-btn.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.discover-btn:hover {
    transform: translateX(-50%) translateY(-5px) scale(1.02);
    background: var(--color-accent);
    /* Solid French Blue on hover */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--color-accent);
    box-shadow: 0 15px 40px rgba(0, 63, 145, 0.3);
    /* Subtle accent glow */
    color: #fff;
    /* White text on hover */
}

.discover-btn:active {
    transform: translateX(-50%) translateY(-2px) scale(0.98);
}

/* Submit Button - General Purpose */
.submit-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    border: none;
    border-radius: 12px;
    background: var(--color-accent);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.submit-btn:hover {
    background: #003070;
    /* Darker shade of French Blue */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 63, 145, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}



/* Dock Navigation */
.dock-container {
    position: fixed;
    bottom: 30px;
    /* Float the buttons above the edge */
    left: 0;
    width: 100%;
    z-index: 1000;
}

.dock {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    /* Visual bar styles removed as requested */
}

.dock-item {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.4);
    /* Frosted white */
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    color: var(--color-text-primary);
    /* French Blue icons */
    text-decoration: none;
    transition:
        width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
        height 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
        background 0.3s ease,
        color 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    /* overflow hidden removed to show labels outside */
}

/* Invisible hitbox extender to prevent hover flickering */
.dock-item::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -50px;
    z-index: -1;
}

.dock-item.active {
    background: var(--color-accent);
    /* French Blue background */
    border: 1px solid var(--color-accent);
    box-shadow:
        0 0 20px rgba(0, 63, 145, 0.4),
        0 0 40px rgba(0, 63, 145, 0.2);
    color: #fff;
    /* White icon on active */
    transform: translateY(-5px);
    /* Slightly raised by default */
}

.dock-item.active svg {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.dock-item.active::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    color: var(--color-text-primary);
}

.dock-item svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Expansion Effect */
.dock-item:hover {
    width: 68px;
    height: 68px;
    transform: translateY(-12px);
    background: #fff;
    /* White on hover */
    border: 1px solid rgba(255, 255, 255, 0.9);
    color: var(--color-highlight);
    /* Velvet Purple icon on hover */
}

.dock-item:hover svg {
    transform: scale(1.3);
}

/* Show label on hover - Positioned completely OUTSIDE the button */
.dock-item::after {
    content: attr(data-label);
    position: absolute;
    bottom: -35px;
    /* Floating below the glass square */
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    opacity: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-text-primary);
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;

    /* Bubble Style */
    background: white;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.dock-item:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Ensure icons reset smoothly */
.dock-item svg {
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}


/* Tooltip for the label (Alternative if preferred, but manual text expansion is cooler) */
/* Moving the icon and showing text side-by-side inside the expanded width */

/* About Section */
.about-section {
    padding: 100px 0 150px;
    text-align: center;
}

.pronunciation-wrap {
    position: relative;
    display: inline-block;
}

.pronunciation-bg {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    opacity: 0.15;
    /* Subtle ghost text */
    letter-spacing: 0.2em;
    pointer-events: none;
    font-style: italic;
    white-space: nowrap;
    z-index: 0;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
}

/* Glass Card Container */
.glass-card {
    /* Base Glass - Light Mode */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.3));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    /* "Jelly" Glossy Edges */
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    /* Brighter top edge */
    border-left: 1px solid rgba(255, 255, 255, 0.8);
    /* Brighter left edge */

    border-radius: 30px;
    padding: 5rem 4rem;
    /* Significantly larger padding */
    max-width: 1000px;
    /* Wider container */
    margin: 0 auto;

    /* Depth + Inner Glow for the Jelly Look */
    box-shadow:
        0 25px 50px rgba(0, 63, 145, 0.1),
        /* Colored shadow */
        inset 0 0 0 1px rgba(255, 255, 255, 0.5),
        /* Subtle inner stroke */
        inset 0 0 20px rgba(255, 255, 255, 0.5);
    /* Inner glow */

    position: relative;
    overflow: hidden;
    z-index: 1;
}

.glass-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;

    /* Pattern */
    background-color: var(--color-accent-light);

    /* Mask */
    -webkit-mask-image: url('../images/ClubScout (2).svg');
    mask-image: url('../images/ClubScout (2).svg');
    -webkit-mask-size: 60px;
    mask-size: 60px;
    -webkit-mask-repeat: repeat;
    mask-repeat: repeat;

    opacity: 0.08;
    /* Very subtle fade */
}

.section-desc {
    max-width: 600px;
    margin: 20px auto 0;
    color: var(--color-text-secondary);
    /* French Blue variant */
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Authentication Styles */
.auth-section {
    padding-top: 80px;
    padding-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;

    /* Dot Grid Background */
    background-image: radial-gradient(#003F91 0.75px, transparent 0.75px);
    background-size: 25px 25px;
    background-position: center;
}

.auth-card {
    width: 100%;
    max-width: 500px;
    padding: 3rem;
}

.auth-card.wide-card {
    max-width: 800px;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 63, 145, 0.3);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text-primary);
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.form-input::placeholder {
    color: rgba(0, 63, 145, 0.5);
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(0, 63, 145, 0.1);
}

/* File Input Styling */
.form-input[type="file"] {
    padding: 0.5rem;
    /* Reduce padding for file inputs */
}

.form-input::file-selector-button {
    margin-right: 1rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    background: rgba(0, 63, 145, 0.1);
    color: var(--color-accent);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.form-input::file-selector-button:hover {
    background: var(--color-accent);
    color: white;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-primary);
    font-weight: 500;
}

.form-checkbox {
    width: 1.2em;
    height: 1.2em;
    accent-color: var(--color-accent);
}

.error-wrapper {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.error-msg {
    color: #dc2626;
    /* Red */
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--color-text-secondary);
}

.auth-footer a {
    color: var(--color-accent);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    opacity: 0.8;
}

/* Signup Wide Layout */
.signup-card-wide {
    max-width: 1100px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 3rem;
    padding: 3rem;
}

.signup-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    padding-right: 4rem;
}

.signup-right {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Responsive adjust for signup */
@media (max-width: 850px) {
    .signup-card-wide {
        flex-direction: column;
        gap: 2rem;
        padding: 2.5rem;
    }

    .signup-left {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.4);
        padding-bottom: 2rem;
        text-align: center;
    }

    .signup-left .section-title,
    .signup-left .section-desc,
    .signup-left .auth-footer {
        text-align: center !important;
    }
}

/* Tag Selection Styles */
.tag-option {
    background: rgba(0, 63, 145, 0.1);
    border: 1px solid rgba(0, 63, 145, 0.3);
    color: var(--color-text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-option:hover {
    background: rgba(0, 63, 145, 0.2);
}

.tag-option.selected {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.selected-tag-chip {
    background: var(--color-accent);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 16px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.selected-tag-chip .remove-tag {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.8;
}

.selected-tag-chip .remove-tag:hover {
    opacity: 1;
}

/* Account Page Layout */
.account-page {
    display: flex;
    min-height: 100vh;
    padding-top: 70px;
}

.account-left {
    width: 40%;
    padding: 2rem 3rem;
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow: hidden;
    /* Relative position for the sliding menu */
    position: relative;
}

.account-right {
    width: 60%;
    padding: 3rem;
    padding-left: 2rem;
    border-left: 1px solid rgba(0, 63, 145, 0.1);

    /* Dot Grid Background */
    background-image: radial-gradient(#003F91 1px, transparent 1px);
    background-size: 25px 25px;
    background-position: 0 0;
}

.stat-card {
    background: rgba(0, 63, 145, 0.08);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

@media (max-width: 900px) {
    .account-page {
        flex-direction: column;
    }

    .account-left {
        width: 100%;
        position: relative;
        top: 0;
        border-bottom: 1px solid rgba(0, 63, 145, 0.1);
        max-height: none;
    }

    .account-right {
        width: 100%;
        border-left: none;
        padding-left: 3rem;
    }
}

/* Sliding Tag Menu */
.select-tags-container {
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 63, 145, 0.3);
    position: relative;
    overflow: hidden;
}

.add-tag-btn {
    background: var(--color-accent);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.add-tag-btn.open {
    transform: rotate(45deg);
}

.tag-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 40%;
    height: 90vh;
    background: linear-gradient(180deg, rgba(240, 246, 255, 0.98) 0%, rgba(220, 235, 255, 0.98) 100%);
    backdrop-filter: blur(10px);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow-y: auto;
}

.tag-menu.open {
    transform: translateY(0);
}

.tag-menu-content {
    padding: 1.5rem;
}

.tag-category {
    margin-bottom: 1.25rem;
}

.tag-category:last-child {
    margin-bottom: 0;
}

.tag-category-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.tag-options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Club Join Button */
.club-join-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    border: none;
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Split View Layout (Shared by Create Club & Create Post) */
.split-view-container {
    display: flex;
    gap: 3rem;
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
    margin: 0 auto;
    align-items: flex-start;
    min-height: 100%;
}

.split-preview-column {
    flex: 1;
    position: sticky;
    top: 20vh;
    max-width: 400px;
}

.split-form-column {
    flex: 1.5;
    padding-bottom: 2rem;
}

@media (max-width: 900px) {
    .split-view-container {
        flex-direction: column;
        align-items: center;
    }

    .split-preview-column {
        position: relative;
        top: 0;
        width: 100%;
        max-width: 500px;
        margin-bottom: 2rem;
    }

    .split-form-column {
        width: 100%;
    }
}

/* Shared Preview Card Styles */
.club-card-preview {
    overflow: hidden;
    padding: 0;
    width: 100%;
    background: white;
    /* Fallback */
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    box-shadow: none;
    border: 1px solid rgba(0, 63, 145, 0.2);
}

.club-card-preview::before {
    display: none;
}