:root {
    /* Bright Color Palette */
    --primary-teal: #00CED1;
    --primary-teal-dark: #008B8B;
    --accent-green: #7FFF00;
    --accent-green-dark: #66CC00;
    --marigold: #FFA500;
    --marigold-dark: #FF8C00;
    --background-dark: #1E3A8A;
    --background-light: #2563EB;
    --text-light: #FFFFFF;
    --text-muted: #B0B0B0;
    --warning-yellow: #FFD700;
    --error-red: #FF4444;
    --success-green: #00FF88;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 206, 209, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 206, 209, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 206, 209, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    /* Prevent text size adjustment on iOS */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Smooth scrolling */
    scroll-behavior: smooth;
    /* Better mobile rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--background-light) 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    /* Improve touch scrolling on mobile */
    -webkit-overflow-scrolling: touch;
    /* Prevent pull-to-refresh on mobile */
    overscroll-behavior-y: contain;
    /* Better touch handling */
    touch-action: pan-y;
}

/* Landing page specific background */
.landing-page {
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--background-light) 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

/* Header & Hero */
.hero-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: center;
    gap: var(--spacing-xl);
    position: relative;
    padding: var(--spacing-xl) 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 1rem;
}

.title-animation {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Remove gradient from title-animation when it contains logo spans */
.title-animation .logo-mystery,
.title-animation .logo-chase {
    -webkit-text-fill-color: initial;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    /* Mobile touch optimization */
    min-height: 44px; /* Minimum touch target size */
    touch-action: manipulation; /* Disable double-tap zoom */
    -webkit-tap-highlight-color: rgba(0, 206, 209, 0.2);
    user-select: none; /* Prevent text selection on tap */
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-dark));
    color: var(--text-light);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--marigold), var(--marigold-dark));
    color: var(--text-light);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--marigold-dark), var(--marigold));
}

.btn-danger {
    background: var(--error-red);
    color: var(--text-light);
}

.btn-success {
    background: var(--success-green);
    color: var(--background-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-teal);
    color: var(--primary-teal);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--primary-teal);
    color: var(--background-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary-teal);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-green);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.feature-card h3 {
    color: var(--primary-teal);
    margin-bottom: var(--spacing-sm);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    /* Mobile optimization */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* Prevent body scroll when modal is open */
    touch-action: none;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Hide or minimize ad when modal is open */
body.modal-open #container-e5ab0655995a500ba62bee4684350d68 {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.large-modal.show {
    display: flex;
}

.modal-content {
    background: var(--background-light);
    border: 2px solid var(--primary-teal);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideDown 0.3s ease;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}

/* Large modal for create chase form */
.large-modal {
    align-items: flex-start;
    padding-top: 2rem;
    padding-bottom: 2rem;
    background-color: rgba(0, 0, 0, 0.85);
}

.large-modal .modal-content-large {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.95) 0%, rgba(37, 99, 235, 0.95) 100%);
    border: 2px solid var(--primary-teal);
    border-radius: var(--radius-lg);
    padding: 0;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    position: relative;
    animation: slideDown 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 206, 209, 0.4), 0 0 60px rgba(255, 165, 0, 0.2);
    backdrop-filter: blur(10px);
    overflow: hidden;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.modal-content-large .modal-header {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.modal-content-large .modal-body {
    padding: var(--spacing-xl);
    overflow-y: auto;
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
}

.modal-content-large .modal-footer {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-teal);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent-green);
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.modal-content form {
    margin-top: var(--spacing-md);
}

.modal-content h2 {
    margin-bottom: var(--spacing-lg);
    color: var(--primary-teal);
}

/* Auth Modal Styling */
.auth-modal {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.95) 0%, rgba(37, 99, 235, 0.95) 100%);
    border: 2px solid var(--primary-teal);
    box-shadow: 0 8px 32px rgba(0, 206, 209, 0.4), 0 0 60px rgba(255, 165, 0, 0.2);
    backdrop-filter: blur(10px);
}

.auth-modal-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.auth-logo {
    width: 120px;
    height: auto;
    margin: 0 auto var(--spacing-md);
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 206, 209, 0.3));
    animation: fadeIn 0.6s ease;
}

.auth-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: var(--spacing-sm);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.input-group {
    margin-bottom: var(--spacing-md);
}

.input-group label {
    display: block;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 1rem;
    min-height: 48px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-teal);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 206, 209, 0.3);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* File input styling */
input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: var(--spacing-md);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    border-color: var(--primary-teal);
    background: rgba(255, 255, 255, 0.2);
}

input[type="file"]:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 20px rgba(0, 206, 209, 0.3);
}

input[type="file"]::file-selector-button {
    background: var(--primary-teal);
    color: var(--text-light);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    margin-right: var(--spacing-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary-teal-dark);
    transform: scale(1.05);
}

.auth-modal .btn-primary {
    width: 100%;
    margin-top: var(--spacing-md);
    font-size: 1.1rem;
    padding: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 206, 209, 0.4);
}

.auth-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 206, 209, 0.6);
}

.auth-switch {
    text-align: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-switch a {
    color: var(--marigold);
    text-decoration: none;
    font-weight: 600;
    margin-left: var(--spacing-xs);
    transition: color 0.3s ease;
}

.auth-switch a:hover {
    color: var(--marigold-dark);
    text-decoration: underline;
}

.close {
    position: absolute;
    right: var(--spacing-md);
    top: var(--spacing-md);
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--primary-teal);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 1rem;
    margin-bottom: var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary-teal);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 1rem;
    min-height: 48px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* Ensure date/time and tel inputs have consistent height/style */
input[type="date"],
input[type="datetime-local"],
input[type="tel"] {
    height: 52px;
    line-height: 1.5;
    padding: 0 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

input[type="datetime-local"] {
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-light);
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 10px rgba(127, 255, 0, 0.3);
}

.birthday-select-group {
    display: flex;
    gap: var(--spacing-sm);
}

.birthday-select-group select {
    flex: 1;
    margin-bottom: 0;
}

.auth-modal select {
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-light);
}

.auth-modal select:focus {
    border-color: var(--primary-teal);
}

.auth-modal select option {
    color: #0f172a;
    background: #ffffff;
}

input::placeholder {
    color: var(--text-muted);
}

.auth-switch {
    text-align: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--primary-teal);
    text-decoration: none;
    font-weight: 600;
    margin-left: var(--spacing-xs);
}

.auth-switch a:hover {
    color: var(--accent-green);
}

/* Dashboard */
.dashboard {
    padding: var(--spacing-lg) var(--spacing-xl);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.dashboard-title {
    font-size: 2.5rem;
    color: var(--primary-teal);
}

.dashboard-header .btn {
    min-width: 160px;
}

+.header-mascot {
    display: flex;
    align-items: center;
    justify-content: center;
}

+.header-mascot img {
    max-width: 160px;
    width: 100%;
    filter: drop-shadow(0 12px 24px rgba(15, 23, 42, 0.35));
}

.my-chases-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.summary-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    text-align: center;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.3);
}

.summary-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #7dd3fc;
}

.summary-label {
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.chase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 360px));
    gap: var(--spacing-lg);
    justify-content: center;
    padding: 0 var(--spacing-md);
    margin: 0 auto;
}

.new-chases-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.chase-search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
}

.chase-search-bar input {
    flex: 1 1 280px;
    max-width: 400px;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-md);
    border: 2px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-light);
    font-size: 1rem;
}

.chase-search-bar input::placeholder {
    color: var(--text-muted);
}

.chase-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-teal);
    border-radius: var(--radius-md);
    padding: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.chase-card.expanded {
    border-color: var(--accent-green);
    box-shadow: var(--shadow-lg);
}

.chase-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-green);
    box-shadow: var(--shadow-md);
}

.new-chase-details {
    display: none;
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.new-chase-details.show {
    display: block;
}

.chase-card-image {
    width: 100%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chase-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
    background: rgba(0, 0, 0, 0.1);
    display: block;
    position: relative;
    z-index: 1;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

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

.chase-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-teal), transparent);
    opacity: 0.5;
    z-index: 2;
    pointer-events: none;
}

.chase-placeholder {
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--background-light) 100%);
    position: relative;
    overflow: hidden;
}

.chase-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 206, 209, 0.1) 10px,
        rgba(0, 206, 209, 0.1) 20px
    );
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

/* Ensure image is visible even in placeholder containers */
.chase-placeholder img {
    position: relative;
    z-index: 1;
}

/* When there's a real image, don't show placeholder background */
.chase-card-image:not(.chase-placeholder) {
    background: transparent;
}

.chase-card-image:not(.chase-placeholder)::before {
    display: none;
}

.chase-card-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.chase-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.chase-card-header h3 {
    color: var(--primary-teal);
    margin: 0;
    flex: 1;
    cursor: pointer;
}

.chase-card-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.chase-card-actions .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.chase-card-location {
    color: var(--text-muted);
    margin: 0;
    cursor: pointer;
}

.chase-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xs);
}

.chase-password-tag {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.chase-details {
    display: none;
    margin-top: var(--spacing-md);
    border-top: 1px solid rgba(0, 206, 209, 0.2);
    padding-top: var(--spacing-md);
}

.chase-details.show {
    display: block;
}

.chase-details-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.chase-details-meta {
    display: grid;
    gap: var(--spacing-xs);
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    color: var(--text-light);
    font-size: 0.95rem;
}

.chase-details-meta p {
    margin: 0;
}

.chase-details-items h4 {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--primary-teal);
}

.chase-item-row {
    display: flex;
    gap: var(--spacing-sm);
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 206, 209, 0.2);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
}

.chase-item-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.chase-item-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    padding: var(--spacing-xs);
}

.chase-item-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.chase-item-body h5 {
    margin: 0;
    color: var(--text-light);
}

.chase-item-body p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.chase-item-hint {
    font-style: italic;
}

.chase-details-empty {
    color: var(--text-muted);
    font-style: italic;
}

.empty-items-message {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    margin: var(--spacing-md) 0;
}

.chase-details-error {
    color: var(--error-red);
    font-size: 0.9rem;
}

.chase-details-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.chase-card h3 {
    color: var(--primary-teal);
    margin-bottom: var(--spacing-xs);
}

.chase-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: var(--spacing-xs);
}

.status-open {
    background: var(--accent-green);
    color: var(--background-dark);
}

.status-in-progress {
    background: var(--warning-yellow);
    color: var(--background-dark);
}

.status-completed {
    background: var(--primary-teal);
    color: var(--text-light);
}

.status-inactive {
    background: var(--text-muted);
    color: var(--text-light);
    opacity: 0.6;
}

/* Toggle Switch */
.chase-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: var(--spacing-sm);
    cursor: pointer;
}

.chase-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: var(--text-muted);
    transition: 0.3s;
    border-radius: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.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.3);
}

.chase-toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-dark) 100%);
    box-shadow: 0 0 10px rgba(127, 255, 0, 0.5);
}

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

.chase-toggle-switch:hover .toggle-slider {
    box-shadow: 0 0 15px rgba(0, 206, 209, 0.4);
}

.chase-toggle-switch input:checked + .toggle-slider:hover {
    box-shadow: 0 0 15px rgba(127, 255, 0, 0.6);
}

/* Item List */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.chase-detail .items-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: calc(var(--spacing-lg) * 1.1);
    align-items: stretch;
}

/* Chase header enhancements */
.chase-header {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-teal);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--spacing-lg);
}

.chase-cover-image {
    width: 100%;
    height: 280px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chase-cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.chase-header-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.chase-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.chase-meta-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(0, 206, 209, 0.2);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.chase-meta-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chase-meta-value {
    color: var(--primary-teal);
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0;
}

.chase-meta-value.score {
    color: var(--accent-green);
    font-size: 1.75rem;
}

.chase-item-actions {
    margin-top: var(--spacing-xs);
}

.chase-item-actions .btn {
    width: 100%;
}

.item-submissions-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.item-submission-card {
    display: flex;
    gap: var(--spacing-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    flex-wrap: wrap;
}

.item-submission-image {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.item-submission-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.item-submission-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    min-width: 200px;
}

.item-submission-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-pill.status-in_review {
    background: var(--warning-yellow);
    color: var(--background-dark);
}

.status-pill.status-approved {
    background: var(--accent-green);
    color: var(--background-dark);
}

.status-pill.status-rejected {
    background: var(--error-red);
    color: var(--text-light);
}

.status-pill.status-open {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.status-pill.status-in-progress {
    background: rgba(250, 204, 21, 0.25);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.4);
}

.status-pill.status-completed {
    background: rgba(72, 199, 142, 0.25);
    color: #34d399;
    border: 1px solid rgba(72, 199, 142, 0.4);
}

.status-pill.status-error {
    background: rgba(248, 113, 113, 0.25);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.4);
}

.item-submission-time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.item-submission-player {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.item-submission-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.upload-placeholder {
    width: 100%;
    height: 120px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.section-header h2 {
    margin: 0;
    color: var(--primary-teal);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.chase-items-section {
    margin-top: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.item-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-teal);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    text-align: center;
    position: relative;
}

.item-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
}

.status-icon {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.status-pending {
    background: var(--warning-yellow);
    color: var(--background-dark);
}

.status-approved {
    background: var(--success-green);
    color: var(--background-dark);
}

.status-rejected {
    background: var(--error-red);
    color: var(--text-light);
}

/* Upload Section */
.upload-section {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed var(--primary-teal);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    margin: var(--spacing-md) 0;
    transition: all 0.3s ease;
}

.upload-section:hover {
    border-color: var(--accent-green);
    background: rgba(255, 255, 255, 0.08);
}

.upload-section.dragover {
    border-color: var(--accent-green);
    background: rgba(127, 255, 0, 0.1);
}

.upload-preview {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius-sm);
    margin: var(--spacing-md) 0;
}

/* Leaderboard */
.leaderboard {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm);
    margin: var(--spacing-xs) 0;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.leaderboard-item.rank-up {
    animation: highlightRank 0.5s ease;
}

.rank-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background: var(--primary-teal);
    color: var(--text-light);
}

.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #808080);
}

.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
}

/* Ad Container Base Styles */
.ad-container {
    display: block !important;
    visibility: visible !important;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10;
    background: transparent;
    overflow: hidden;
    isolation: isolate;
    contain: layout style paint;
    pointer-events: auto;
    transform: translateZ(0);
    will-change: auto;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Mobile Ad Container (320x50) - Show on all screen sizes */
.ad-mobile {
    width: 100%;
    max-width: 320px;
    padding: 0.25rem;
    min-height: 50px;
    max-height: 50px;
    height: 50px;
    display: block !important;
}

/* Ad Container - Isolated from body to prevent click interception */
#container-e5ab0655995a500ba62bee4684350d68 {
    display: block !important;
    visibility: visible !important;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 0.25rem;
    text-align: center;
    min-height: 50px;
    position: relative;
    z-index: 10;
    background: transparent;
    overflow: hidden;
    /* Create complete isolation - events don't bubble out */
    isolation: isolate;
    contain: layout style paint;
    /* Only allow pointer events within this container */
    pointer-events: auto;
    /* Prevent any transforms or filters from affecting outside */
    transform: translateZ(0);
    will-change: auto;
    box-sizing: border-box;
    /* Prevent layout shift */
    flex-shrink: 0;
}

/* Hide ads when modal is open to prevent interference */
body.modal-open .ad-container,
body.modal-open #container-e5ab0655995a500ba62bee4684350d68 {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}


/* Mobile Ad iframe (320x50) */
#container-e5ab0655995a500ba62bee4684350d68 iframe,
#container-e5ab0655995a500ba62bee4684350d68 > * {
    display: block !important;
    visibility: visible !important;
    width: 100%;
    max-width: 320px;
    height: 50px;
    margin: 0 auto;
    border: none;
    position: relative;
    pointer-events: auto;
    isolation: isolate;
}

/* Ensure any dynamically created ad elements are visible and contained */
#container-e5ab0655995a500ba62bee4684350d68 * {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto;
    max-width: 728px;
    /* Prevent events from bubbling outside container */
    isolation: isolate;
}

/* Prevent ad overlays from intercepting clicks outside the container */
body {
    position: relative;
    /* Ensure body doesn't capture ad events */
    pointer-events: auto;
}

/* Block any invisible overlays that might be created by ad scripts */
body > div[style*="position: fixed"]:not(#container-e5ab0655995a500ba62bee4684350d68):not(.modal):not(.loading-overlay):not(.navbar),
body > div[style*="position:absolute"]:not(#container-e5ab0655995a500ba62bee4684350d68):not(.modal):not(.loading-overlay):not(.navbar) {
    pointer-events: none !important;
    display: none !important;
    visibility: hidden !important;
}

/* Ensure body and all non-ad elements don't capture ad-related events */
body:not(#container-e5ab0655995a500ba62bee4684350d68),
body > *:not(#container-e5ab0655995a500ba62bee4684350d68) {
    /* Normal pointer events for page content */
    pointer-events: auto;
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */

/* Tablet and Mobile (768px and below) */
@media (max-width: 768px) {
    /* Typography adjustments */
    .title-animation {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .subtitle {
        font-size: 1.2rem;
        line-height: 1.4;
    }
    
    /* Button and CTA optimizations */
    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        min-height: 48px; /* Touch-friendly minimum */
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
        /* Improve touch targets */
        touch-action: manipulation;
    }
    
    /* Layout adjustments */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Chase grid improvements */
    .chase-grid {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-md);
        padding: 0;
    }
    
    .chase-card {
        max-width: 100% !important;
        margin: 0;
    }
    
    /* Summary cards */
    .my-chases-summary {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .summary-card {
        padding: var(--spacing-md);
    }
    
    .summary-value {
        font-size: 2rem;
    }

    /* Hero section mobile */
    .hero-mascot img {
        max-width: 260px;
        height: auto;
    }

    .header-mascot {
        width: 100%;
        justify-content: flex-start;
    }

    .header-mascot img {
        max-width: 120px;
        height: auto;
    }

    /* Mobile Ad Container - Use mobile ad (320x50) on all devices */
    .ad-mobile {
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
        padding: 0.25rem !important;
        display: block !important;
        visibility: visible !important;
        min-height: 50px !important;
        max-height: 50px !important;
        height: 50px !important;
        position: relative !important;
        z-index: 1 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    /* Mobile ad iframe (320x50) */
    #container-e5ab0655995a500ba62bee4684350d68 iframe,
    #container-e5ab0655995a500ba62bee4684350d68 > * {
        max-width: 100% !important;
        width: 100% !important;
        height: 50px !important;
        max-height: 50px !important;
        min-height: 50px !important;
        display: block !important;
        visibility: visible !important;
        border: none !important;
        position: relative !important;
        box-sizing: border-box !important;
        object-fit: contain !important;
        transform: scale(1) !important;
    }
    
    /* Hide desktop ad on all devices */

    /* Scale down ad content to fit mobile screens */
    .ad-container * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Container spacing */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
        width: 100%;
    }

    /* Ensure all images are responsive */
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* Video responsiveness */
    video {
        max-width: 100%;
        height: auto;
    }
    
    .promo-video-frame {
        width: 100%;
        max-width: 100%;
    }
    
    .promo-video-frame video {
        width: 100%;
        height: auto;
    }
    
    /* Chase card images */
    .chase-card-image {
        min-height: 200px;
    }
    
    .chase-card-image img {
        height: 200px;
    }
    
    /* Item images */
    .item-image {
        height: 180px;
    }
    
    .chase-item-thumb {
        width: 60px;
        height: 60px;
    }
    
    .item-submission-image {
        width: 100px;
        height: 100px;
    }

    /* Form inputs mobile optimization */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="datetime-local"],
    input[type="time"],
    input[type="number"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        min-height: 48px; /* Touch-friendly */
        padding: 0.875rem 1rem;
        width: 100%;
        box-sizing: border-box;
        -webkit-appearance: none;
        appearance: none;
    }
    
    textarea {
        min-height: 120px;
        resize: vertical;
    }
    
    /* Form sections */
    .form-section {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-sm);
    }
    
    .birthday-select-group {
        flex-direction: column;
    }
    
    .birthday-select-group select {
        width: 100%;
    }
    
    /* Input groups */
    .input-group {
        margin-bottom: var(--spacing-md);
    }
    
    .input-group label {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    /* File inputs */
    input[type="file"] {
        min-height: 48px;
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    input[type="file"]::file-selector-button {
        min-height: 44px;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Modal mobile optimization */
    .modal {
        padding: 1rem;
        align-items: center;
        justify-content: center;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal.show {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: auto;
        max-height: calc(100vh - 2rem);
        min-height: auto;
        height: auto;
        border-radius: var(--radius-lg);
        padding: 1.5rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
        position: relative;
        display: flex;
        flex-direction: column;
    }
    
    /* Auth modal specific mobile fixes */
    .auth-modal {
        width: 100%;
        max-width: 100%;
        margin: auto;
        border-radius: var(--radius-lg);
        padding: 1.25rem 1.25rem 1.5rem;
        max-height: calc(100vh - 2rem);
        height: auto;
        min-height: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }
    
    .auth-modal-header {
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
        padding-top: 0;
        flex-shrink: 0;
        position: relative;
    }
    
    .auth-modal form {
        flex: 0 1 auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    
    .large-modal {
        padding: 0;
    }
    
    .large-modal .modal-content-large {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .large-modal .modal-body {
        max-height: calc(100vh - 140px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-header,
    .modal-footer {
        flex-shrink: 0;
    }
    
    .close {
        min-width: 40px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.75rem;
        right: 0.75rem;
        top: 0.75rem;
        z-index: 10;
        position: absolute;
        background: rgba(0, 0, 0, 0.4);
        border-radius: 50%;
        backdrop-filter: blur(5px);
        color: var(--text-light);
    }
    
    /* Auth modal logo and title adjustments */
    .auth-logo {
        max-width: 80px;
        width: auto;
        margin: 0 auto 0.75rem;
        display: block;
    }
    
    .auth-title {
        font-size: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 0.25rem;
    }
    
    .auth-subtitle {
        font-size: 0.9rem;
        margin-top: 0;
        margin-bottom: 0;
    }
    
    /* Ensure auth modal content fits */
    .auth-modal .input-group {
        margin-bottom: 1rem;
    }
    
    .auth-modal .input-group label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .auth-modal .input-group input {
        padding: 0.875rem;
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 48px;
    }
    
    .auth-modal .btn-primary {
        margin-top: 1rem;
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .auth-switch {
        margin-top: 1rem;
        padding-top: 0.75rem;
        font-size: 0.85rem;
        flex-shrink: 0;
        text-align: center;
    }

    /* Hero section spacing - Single column on mobile */
    .hero-section {
        padding: var(--spacing-md) 0;
        gap: var(--spacing-md);
        grid-template-columns: 1fr !important;
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }

    .hero-mascot {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: var(--spacing-md) 0;
    }

    /* Prevent horizontal overflow */
    body, html {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        position: relative;
    }

    /* Ensure all containers respect viewport width */
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 1rem;
        padding-right: 1rem;
        box-sizing: border-box;
        margin: 0 auto;
    }

    /* Fix card overflow issues */
    .chase-card,
    .card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto;
        box-sizing: border-box;
    }

    /* Improve touch scrolling */
    * {
        -webkit-tap-highlight-color: rgba(0, 206, 209, 0.2);
    }

    /* Better spacing for mobile */
    section {
        padding: var(--spacing-md) 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Dashboard spacing */
    .dashboard {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    /* Feature cards */
    .features {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .feature-card {
        padding: var(--spacing-md);
    }
    
    /* How it works section */
    .how-it-works {
        padding: var(--spacing-lg) 0;
    }
    
    .how-it-works h2 {
        font-size: 2rem;
    }
    
    .how-it-works-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .how-card {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    /* Chase detail improvements */
    .chase-header {
        padding: var(--spacing-md);
    }
    
    .chase-cover-image {
        height: 200px;
    }
    
    .chase-meta-grid {
        grid-template-columns: 1fr;
    }
    
    /* Item submission cards */
    .item-submission-card {
        flex-direction: column;
    }
    
    .item-submission-image {
        width: 100%;
        max-width: 100%;
        height: 200px;
    }
    
    /* Leaderboard */
    .leaderboard-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
    
    .leaderboard-row {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: var(--spacing-sm);
    }
    
    .leaderboard-row-rank {
        grid-row: 1 / 3;
    }
    
    .leaderboard-row-body {
        grid-column: 2;
        grid-row: 1;
    }
    
    .leaderboard-row-score {
        grid-column: 2;
        grid-row: 2;
        align-items: flex-start;
        text-align: left;
    }
    
    .leaderboard-row-status {
        grid-column: 1 / 3;
        grid-row: 3;
        justify-self: flex-start;
    }
    
    .leaderboard-featured {
        grid-template-columns: 1fr;
        text-align: center;
        padding: var(--spacing-md);
    }
    
    .leaderboard-featured-rank {
        margin: 0 auto;
    }
    
    .leaderboard-featured-body {
        flex-direction: column;
        align-items: center;
    }
    
    .leaderboard-card {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: var(--spacing-sm);
    }
    
    .leaderboard-card-left {
        grid-row: 1 / 3;
    }
    
    .leaderboard-card-main {
        grid-column: 2;
        grid-row: 1;
    }
    
    .leaderboard-score-badge {
        grid-column: 2;
        grid-row: 2;
        justify-self: flex-start;
    }
    
    /* Progress bar */
    .progress-bar {
        height: 24px;
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: center;
    }
    
    .footer-socials {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: center;
    }
    
    /* Chase search bar */
    .chase-search-bar {
        flex-direction: column;
    }
    
    .chase-search-bar input {
        max-width: 100%;
        margin-bottom: var(--spacing-sm);
        min-height: 48px;
    }
    
    .chase-search-bar .btn {
        width: 100%;
        min-height: 48px;
    }
    
    /* Join chase form */
    .join-chase-wrapper {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .join-card {
        padding: var(--spacing-md);
    }
    
    .dual-input {
        grid-template-columns: 1fr;
    }
    
    /* Chase summary */
    .summary-details {
        grid-template-columns: 1fr;
    }
    
    /* Snapshot cards */
    .chase-snapshot-card {
        padding: var(--spacing-md);
    }
    
    .snapshot-row {
        grid-template-columns: auto 1fr;
        gap: var(--spacing-sm);
    }
    
    .snapshot-rank {
        grid-row: 1 / 3;
    }
    
    .snapshot-content {
        grid-column: 2;
    }
    
    .snapshot-pill {
        grid-column: 1 / 3;
        justify-self: flex-start;
        margin-top: var(--spacing-xs);
    }
    
    /* Tabs */
    .manage-tabs {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }
    
    .tab-btn {
        min-height: 44px;
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.9rem;
    }
    
    /* Player cards */
    .player-card {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    /* Upload section */
    .upload-section {
        padding: var(--spacing-md);
    }
    
    .upload-preview {
        max-height: 300px;
    }
    
    /* Chase details */
    .chase-details-meta {
        grid-template-columns: 1fr;
    }
    
    .chase-item-row {
        flex-direction: column;
    }
    
    .chase-item-thumb {
        width: 100%;
        height: 150px;
        object-fit: cover;
    }
    
    /* Form actions */
    .form-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .form-actions .btn {
        width: 100%;
    }

    /* Fix title animation centering on mobile */
    .title-animation {
        justify-content: center;
        text-align: center;
        flex-wrap: wrap;
    }

    /* Navbar mobile fixes */
    .navbar {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        padding: var(--spacing-xs) 1rem;
    }

    .nav-content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        position: relative;
    }

    .logo {
        max-width: calc(100% - 60px);
        overflow: hidden;
        flex-shrink: 1;
    }

    .logo img {
        max-height: 35px;
        width: auto;
    }
    
    .logo-text {
        font-size: 0.9rem;
    }
    
    .logo-mystery {
        font-size: 1.2rem !important;
    }
    
    .logo-chase {
        font-size: 1.4rem !important;
    }
    
    /* Better mobile nav toggle */
    .nav-toggle {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 101;
    }
    
    /* Improved mobile nav menu */
    .nav-actions {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        background: rgba(10, 15, 46, 0.98);
        backdrop-filter: blur(20px);
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 5rem 1.5rem 2rem;
        flex-direction: column;
        gap: var(--spacing-md);
        min-width: auto;
        width: 100%;
        height: 100vh;
        transform: translateX(100%);
        opacity: 1;
        transition: transform 0.3s ease;
        z-index: 100;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-actions.show {
        transform: translateX(0);
    }
    
    .nav-actions .btn {
        width: 100%;
        min-height: 52px;
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
    }

    /* Prevent any element from causing horizontal scroll */
    * {
        max-width: 100%;
    }
    
    /* Ensure tables and pre elements don't overflow */
    table {
        width: 100%;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    pre {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        word-wrap: break-word;
        white-space: pre-wrap;
    }
    
    /* QR code images */
    .qr-code-image {
        max-width: 250px;
    }
    
    /* Auth logo - already defined above in mobile section */
    
    /* Status pills and badges */
    .status-pill,
    .chase-status-banner {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
    
    /* Item action buttons */
    .item-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .item-actions .btn {
        width: 100%;
    }
    
    /* Upload actions */
    .upload-actions {
        flex-direction: column;
    }
    
    .upload-actions .btn {
        width: 100%;
    }
    
    /* Item submission actions */
    .item-submission-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .item-submission-actions .btn {
        width: 100%;
    }

    /* Ensure main content areas are properly constrained */
    main {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        overflow-x: hidden;
    }
}

/* Small Mobile Devices (480px and below) */
@media (max-width: 480px) {
    /* Mobile ad container - Keep at 50px but reduce padding */
    .ad-mobile {
        padding: 0.15rem !important;
        min-height: 50px !important;
        max-height: 50px !important;
        height: 50px !important;
        display: block !important;
    }

    #container-e5ab0655995a500ba62bee4684350d68 iframe,
    #container-e5ab0655995a500ba62bee4684350d68 > * {
        height: 50px !important;
        max-height: 50px !important;
        min-height: 50px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Ensure desktop ad is hidden */

    /* Reduce font sizes for very small screens */
    .title-animation {
        font-size: 2rem !important;
        line-height: 1.1;
    }

    .subtitle {
        font-size: 1rem !important;
        line-height: 1.3;
    }
    
    .dashboard-title {
        font-size: 1.75rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }

    /* Container spacing */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Ensure buttons are touch-friendly */
    .btn {
        min-height: 48px;
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .btn-small {
        min-height: 44px;
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }

    /* Optimize spacing for small screens */
    .hero-section {
        padding: var(--spacing-sm) 0;
        gap: var(--spacing-sm);
        grid-template-columns: 1fr !important;
    }

    .hero-content {
        padding: 0;
    }
    
    .hero-logo {
        max-width: 120px;
    }

    /* Reduce padding on cards */
    .card,
    .chase-card {
        padding: 1rem;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .chase-card-content {
        padding: var(--spacing-sm);
    }

    /* Ensure container doesn't overflow */
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Modal on very small screens */
    .modal {
        padding: 0.75rem;
    }
    
    .modal-content {
        padding: 1.25rem 1rem;
        max-height: calc(100vh - 1.5rem);
    }
    
    .auth-modal {
        padding: 1rem 1rem 1.25rem;
        max-height: calc(100vh - 1.5rem);
    }
    
    .auth-modal-header {
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }
    
    .auth-logo {
        max-width: 70px;
        margin-bottom: 0.5rem;
    }
    
    .auth-title {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    .auth-subtitle {
        font-size: 0.85rem;
    }
    
    .auth-modal .input-group {
        margin-bottom: 0.875rem;
    }
    
    .auth-modal .input-group input {
        padding: 0.75rem;
    }
    
    .auth-modal .btn-primary {
        margin-top: 0.875rem;
        padding: 0.75rem 1rem;
    }
    
    .auth-switch {
        margin-top: 0.875rem;
        padding-top: 0.5rem;
        font-size: 0.8rem;
    }
    
    .close {
        min-width: 36px;
        min-height: 36px;
        font-size: 1.5rem;
        right: 0.5rem;
        top: 0.5rem;
    }
    
    .large-modal .modal-body {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    /* Compact grid items */
    .items-grid {
        gap: 0.75rem;
    }

    /* Navbar on small screens */
    .navbar {
        padding: var(--spacing-xs) 0.75rem;
        width: 100% !important;
        max-width: 100% !important;
    }

    .logo img {
        max-height: 32px;
    }
    
    .logo-text {
        font-size: 0.8rem;
    }
    
    .logo-mystery {
        font-size: 1rem !important;
    }
    
    .logo-chase {
        font-size: 1.2rem !important;
    }
    
    /* Form improvements */
    .form-section {
        padding: var(--spacing-sm);
    }
    
    .input-group {
        margin-bottom: var(--spacing-sm);
    }
    
    /* Feature cards */
    .feature-icon {
        font-size: 2.5rem;
    }
    
    /* How it works */
    .how-card-illustration {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .how-card h3 {
        font-size: 1.2rem;
    }
    
    /* Chase detail */
    .chase-hero-content h1 {
        font-size: 1.75rem;
    }
    
    .chase-description {
        font-size: 0.95rem;
    }
    
    /* Summary cards */
    .summary-value {
        font-size: 1.75rem;
    }
}

/* Very Small Devices (320px and below) */
@media (max-width: 320px) {
    /* Mobile ad container - Keep at 50px but minimal padding */
    .ad-mobile {
        padding: 0.1rem !important;
        min-height: 50px !important;
        max-height: 50px !important;
        height: 50px !important;
        display: block !important;
    }

    #container-e5ab0655995a500ba62bee4684350d68 iframe,
    #container-e5ab0655995a500ba62bee4684350d68 > * {
        height: 50px !important;
        max-height: 50px !important;
        min-height: 50px !important;
    }
    
    /* Ensure desktop ad is hidden */

    /* Minimal container spacing */
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Further reduce font sizes */
    .title-animation {
        font-size: 1.75rem !important;
    }

    .subtitle {
        font-size: 0.9rem !important;
    }

    /* Compact buttons */
    .btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }

    /* Minimal spacing */
    .hero-section {
        padding: var(--spacing-xs) 0;
        grid-template-columns: 1fr !important;
    }

    .hero-content {
        padding: 0;
    }

    .card,
    .chase-card {
        padding: 0.75rem;
        width: 100% !important;
        max-width: 100% !important;
    }

    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Removed old social banner ad CSS - no longer needed */

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.hidden {
    display: none;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.loading-overlay-content {
    text-align: center;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.loading-overlay-content .spinner {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

.loading-overlay-message {
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary-teal);
}

.btn.loading::after {
    content: '';
    display: inline-block;
    margin-left: 0.75rem;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--text-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Navbar */
.navbar {
    background: rgba(10, 15, 46, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-teal);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: background 0.3s ease;
}

@media (min-width: 769px) {
    .nav-toggle {
        display: none !important;
    }
}

.nav-toggle:hover,
.nav-toggle:focus {
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.logo {
    color: var(--primary-teal);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.logo-mystery {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: #FFFFFF !important; /* White/light color from logo */
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.logo-chase {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    color: var(--marigold) !important; /* Marigold/orange from logo */
    font-size: 1.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Hero title styling */
.title-animation .logo-mystery {
    font-size: 3rem;
    font-weight: 900;
    color: #FFFFFF !important;
}

.title-animation .logo-chase {
    font-size: 3.5rem;
    letter-spacing: 3px;
    color: var(--marigold) !important;
}

/* Additional mobile optimizations at 768px */
@media (max-width: 768px) {
    /* Override duplicate nav-actions styles */
    .nav-actions {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        background: rgba(10, 15, 46, 0.98);
        backdrop-filter: blur(20px);
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 5rem 1.5rem 2rem;
        flex-direction: column;
        gap: var(--spacing-md);
        min-width: auto;
        width: 100%;
        height: 100vh;
        transform: translateX(100%);
        opacity: 1;
        transition: transform 0.3s ease;
        z-index: 100;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-actions.show {
        transform: translateX(0);
    }

    .nav-actions .btn {
        width: 100%;
        min-height: 52px;
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
        text-align: center;
    }
    
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        z-index: 101;
    }
}

.nav-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* Progress Bar */
.progress-bar-container {
    margin: var(--spacing-md) 0;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--primary-teal);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-teal), var(--accent-green));
    transition: width 0.5s ease;
    border-radius: var(--radius-sm);
}

#progressText {
    display: block;
    margin-top: var(--spacing-xs);
    text-align: center;
    color: var(--text-muted);
}

/* Form Sections */
.form-section {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.form-section h2,
.form-section h3 {
    color: var(--primary-teal);
    margin-bottom: 0;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.form-section-header h3 {
    margin: 0;
}

.form-section label {
    display: block;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    margin-top: var(--spacing-md);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.form-section label:first-of-type {
    margin-top: 0;
}

.form-section label:first-child {
    margin-top: 0;
}

/* Form row for side-by-side fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.form-field {
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .item-submission-card {
        flex-direction: column;
    }
    
    .large-modal .modal-content-large {
        max-width: 95%;
        padding: var(--spacing-md);
    }
}

#editChaseModal .modal-content-large {
    background: #f4f6fb;
    border-radius: 24px;
    border: none;
    padding: 0;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 24px 45px rgba(14, 38, 74, 0.25);
}

#editChaseModal .modal-body {
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

#editChaseModal .modal-close-btn {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(15, 35, 64, 0.15);
    color: #0f172a;
    font-size: 1.4rem;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
    margin-bottom: 1rem;
}

#editChaseModal .modal-close-btn:hover {
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 35, 64, 0.12);
}

#editChaseModal .edit-chase-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#editChaseModal .edit-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 12px 32px rgba(15, 45, 75, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

#editChaseModal .edit-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

#editChaseModal .edit-card-eyebrow {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--primary-teal);
    font-weight: 600;
}

#editChaseModal .edit-card-title {
    margin: 0.35rem 0 0;
    font-size: 1.5rem;
    color: #0f172a;
}

#editChaseModal .edit-card-subtitle {
    margin: 0.35rem 0 0;
    color: rgba(15, 23, 42, 0.65);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 100%;
}

#editChaseModal .edit-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

#editChaseModal label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #0f172a;
}

#editChaseModal .edit-field-hint {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: rgba(15, 23, 42, 0.55);
}

#editChaseModal input[type="file"] {
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px dashed rgba(15, 35, 64, 0.25);
}

#editChaseModal .edit-image-preview {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

#editChaseModal .edit-image-preview img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

#editChaseModal input,
#editChaseModal textarea,
#editChaseModal select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#editChaseModal input:focus,
#editChaseModal textarea:focus,
#editChaseModal select:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 4px rgba(0, 206, 209, 0.18);
    background: #ffffff;
}

#editChaseModal textarea {
    min-height: 120px;
    resize: vertical;
}

#editChaseModal input,
#editChaseModal textarea {
    min-width: 0;
}

#editChaseModal .edit-field-grid {
    display: grid;
    gap: 1rem;
    width: 100%;
}

#editChaseModal .edit-add-item-btn {
    padding: 0.65rem 1.1rem;
    font-size: 0.9rem;
    border-radius: 999px;
}

#editChaseModal .edit-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#editChaseModal .edit-item-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 12px 28px rgba(15, 45, 75, 0.06);
}

#editChaseModal .edit-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

#editChaseModal .edit-item-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#editChaseModal .edit-item-title h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #0f172a;
}

#editChaseModal .edit-item-remove {
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

#editChaseModal .edit-item-existing-image img {
    width: 100%;
    max-height: 200px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

#editChaseModal .edit-item-actions {
    display: flex;
    justify-content: flex-end;
}

#editChaseModal .edit-item-actions .btn {
    width: auto;
    border-radius: 999px;
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
}

#editChaseModal .modal-footer {
    display: flex;
    gap: 0.75rem;
    background: transparent;
    border-top: none;
    padding: 0;
}

#editChaseModal .modal-footer .btn {
    flex: 1 1 0;
    min-height: 48px;
    border-radius: 12px;
    font-size: 1rem;
}

#editChaseModal .modal-action-cancel {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(15, 35, 64, 0.2);
    box-shadow: none;
}

#editChaseModal .modal-action-save {
    box-shadow: 0 12px 24px rgba(0, 206, 209, 0.3);
}

@media (min-width: 640px) {
    #editChaseModal .edit-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    #editChaseModal.large-modal {
        align-items: stretch;
        padding: 0;
    }

    #editChaseModal .modal-content-large {
        max-width: none;
        height: 100vh;
        border-radius: 0;
        box-shadow: none;
    }

    #editChaseModal .modal-body {
        padding: 0 1rem 1rem;
        max-height: calc(100vh - 120px);
    }

    #editChaseModal .edit-card {
        padding: 1rem;
        border-radius: 16px;
    }

    #editChaseModal .edit-item-card {
        padding: 0.875rem;
    }

    #editChaseModal .edit-card-title {
        font-size: 1.25rem;
    }
    
    #editChaseModal .edit-card-subtitle {
        font-size: 0.9rem;
    }

    #editChaseModal .modal-footer {
        padding: var(--spacing-sm);
    }
    
    #editChaseModal .modal-footer .btn {
        min-height: 48px;
        font-size: 0.95rem;
    }
    
    #editChaseModal .edit-field-grid {
        grid-template-columns: 1fr !important;
    }
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    margin-top: var(--spacing-lg);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.2rem;
}

/* Item Form */
.item-form {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--primary-teal);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.item-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.item-form-header h3 {
    color: var(--primary-teal);
}

.item-image-preview {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin: var(--spacing-md) 0;
}

.clue-text {
    color: var(--text-muted);
    font-style: italic;
    margin: var(--spacing-sm) 0;
}

.clue-hint {
    color: var(--accent-green);
    font-size: 0.95rem;
    margin: calc(var(--spacing-xs)) 0 var(--spacing-sm);
}

/* Tabs */
.manage-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--primary-teal);
}

.tab-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary-teal);
}

.tab-btn.active {
    color: var(--primary-teal);
    border-bottom-color: var(--accent-green);
}

.tab-content {
    display: none;
}

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

/* Player List */
.player-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-teal);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upload-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-teal);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.upload-card img {
    width: 100%;
    max-width: 300px;
    border-radius: var(--radius-sm);
    margin: var(--spacing-sm) 0;
}

.upload-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

/* Number Input */
input[type="number"] {
    width: 100%;
    padding: 1rem;
    margin-bottom: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary-teal);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 1rem;
}

/* Item Actions */
.item-actions {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: rgba(10, 15, 46, 0.95);
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--primary-teal);
    padding: var(--spacing-lg) var(--spacing-md);
    margin-top: var(--spacing-xl);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.footer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-teal), var(--accent-green));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.footer-links a:hover::after {
    transform: scaleX(1);
}

+.footer-socials {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-top: var(--spacing-sm);
}

+.footer-socials a {
    color: var(--accent-green);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

+.footer-socials a::before {
    content: '→';
    font-size: 0.85rem;
    opacity: 0.7;
}

+.footer-socials a:hover {
    color: var(--primary-teal-light);
}

/* Hero Logo */
.hero-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto var(--spacing-md);
    display: block;
    filter: drop-shadow(0 0 20px rgba(0, 206, 209, 0.5));
}

@media (max-width: 768px) {
    .hero-logo {
        max-width: 150px;
    }
    
    .logo img {
        height: 30px;
    }
    
    .footer-logo {
        height: 50px;
    }
}

#itemSubmissionsModal .modal-content {
    max-width: 720px;
}

.chase-detail {
    padding: var(--spacing-xl) var(--spacing-lg) var(--spacing-xxl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.chase-detail .chase-overview {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.chase-detail .chase-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: var(--spacing-xl);
    align-items: stretch;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.chase-detail .chase-hero-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 260px;
    background: rgba(0, 0, 0, 0.2);
}

.chase-detail .chase-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chase-detail .chase-hero-content h1 {
    font-size: 2.6rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-teal);
}

.chase-hero-frame {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 24px;
    padding: 0.6rem;
    background: linear-gradient(135deg, rgba(0, 206, 209, 0.35), rgba(15, 24, 71, 0.85));
    box-shadow: 0 20px 45px rgba(2, 12, 48, 0.4);
}

.chase-hero-square {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(12, 23, 64, 0.6);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.chase-hero-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    display: block;
}

.chase-detail .chase-description {
    color: var(--text-light);
    font-size: 1.05rem;
    margin-bottom: var(--spacing-lg);
}

.chase-detail .chase-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--spacing-md);
}

.chase-detail .chase-meta-card {
    background: rgba(10, 15, 46, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.chase-detail .chase-meta-label {
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.chase-detail .chase-meta-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-light);
}

.chase-detail .chase-meta-value.score {
    color: var(--accent-green);
    font-size: 1.8rem;
}

.chase-detail .leaderboard-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.chase-detail .leaderboard-panel h2 {
    margin-top: 0;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-teal);
}

.leaderboard-layout {
    display: grid;
    gap: var(--spacing-lg);
}

.leaderboard-featured {
    background: linear-gradient(155deg, rgba(12, 23, 64, 0.85), rgba(0, 206, 209, 0.25));
    border-radius: 24px;
    padding: var(--spacing-lg);
    box-shadow: 0 20px 40px rgba(2, 12, 48, 0.45);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.leaderboard-featured-rank {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    background: linear-gradient(140deg, #facc15, #f97316);
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    box-shadow: 0 16px 28px rgba(250, 204, 21, 0.35);
}

.leaderboard-featured-rank span {
    transform: translateY(-2px);
}

.leaderboard-featured-body {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.leaderboard-avatar {
    width: 78px;
    height: 78px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.75);
    display: grid;
    place-items: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #f8fafc;
    border: 2px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 12px 24px rgba(2, 12, 48, 0.4);
    text-transform: uppercase;
}

.leaderboard-featured-info h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #f8fafc;
}

.leaderboard-featured-meta {
    margin: 0.35rem 0 0;
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    font-weight: 700;
    color: #f8fafc;
}

.leaderboard-featured-score {
    font-size: 2.1rem;
    color: #facc15;
    text-shadow: 0 6px 16px rgba(250, 204, 21, 0.45);
}

.leaderboard-featured-label {
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(241, 245, 249, 0.75);
}

.leaderboard-featured-duration {
    margin: 0.4rem 0 0;
    color: rgba(226, 232, 240, 0.75);
    font-size: 0.9rem;
}

.leaderboard-featured-status {
    margin-top: 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(148, 163, 184, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: rgba(226, 232, 240, 0.85);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.leaderboard-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(15, 23, 42, 0.45);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.leaderboard-row-rank {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.25);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #e2e8f0;
    font-size: 1rem;
}

.leaderboard-row-rank.top-2 {
    background: rgba(129, 140, 248, 0.45);
    color: #1f2937;
}

.leaderboard-row-rank.top-3 {
    background: rgba(251, 191, 36, 0.55);
    color: #1f2937;
}

.leaderboard-row-body h4 {
    margin: 0;
    color: #f8fafc;
    font-size: 1rem;
}

.leaderboard-row-duration {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.65);
}

.leaderboard-row-score {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1;
}

.leaderboard-row-score .score-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #facc15;
}

.leaderboard-row-score .score-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: rgba(226, 232, 240, 0.6);
    text-transform: uppercase;
}

.leaderboard-row-status {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.2);
    color: #bfdbfe;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.leaderboard-empty {
    padding: var(--spacing-md);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px dashed rgba(148, 163, 184, 0.3);
    color: rgba(226, 232, 240, 0.7);
    text-align: center;
}

.chase-detail .chase-share-panel {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.chase-detail .chase-share-panel h5 {
    margin: 0;
    color: var(--primary-teal);
    letter-spacing: 0.5px;
}

.chase-detail .share-url {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    word-break: break-all;
}

.chase-detail .chase-share-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.chase-detail .progress-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.chase-detail .progress-section h2 {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    color: var(--primary-teal);
}

.chase-detail .item-card {
    position: relative;
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.92), rgba(30, 64, 175, 0.65));
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.chase-detail .item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 48px rgba(2, 6, 23, 0.55);
    border-color: rgba(56, 189, 248, 0.5);
}

.chase-detail .item-card.completed {
    cursor: default;
    opacity: 0.92;
    border-color: rgba(72, 199, 142, 0.6);
}

.item-card.locked,
.chase-detail .item-card.locked {
    cursor: default;
    opacity: 0.85;
    border-color: rgba(148, 163, 184, 0.35);
}

.chase-detail .item-status-pill {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 5;
}

.chase-detail .item-status-pill.status-pending {
    background: rgba(59, 130, 246, 0.85);
    color: var(--background-dark);
}

.chase-detail .item-status-pill.status-approved {
    background: rgba(72, 199, 142, 0.95);
    color: var(--background-dark);
}

.chase-detail .item-status-pill.status-rejected {
    background: rgba(239, 68, 68, 0.92);
    color: var(--text-light);
}

.chase-detail .item-card .item-image {
    width: 100%;
    height: 230px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.chase-detail .item-card:hover .item-image {
    transform: scale(1.03);
}

.chase-detail .item-card .item-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    background: rgba(30, 64, 175, 0.35);
}

.chase-detail .item-body {
    padding: calc(var(--spacing-lg) * 0.9);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex: 1;
}

.chase-detail .item-body h3 {
    margin: 0;
    color: #7dd3fc;
    font-size: 1.35rem;
    letter-spacing: 0.5px;
}

.chase-detail .item-clue {
    color: var(--text-light);
    font-weight: 600;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chase-detail .item-hint {
    color: #bae6fd;
    font-style: italic;
    font-size: 0.9rem;
    margin: 0;
}

.chase-detail .item-submission-preview {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    background: rgba(15, 118, 110, 0.25);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.chase-detail .item-submission-preview span {
    color: #cffafe;
    font-size: 0.75rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.chase-detail .item-submission-preview img {
    width: 100%;
    max-height: 160px;
    border-radius: var(--radius-md);
    object-fit: cover;
    padding: var(--spacing-xs);
}

.btn-disabled {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    border: none;
}

.btn-disabled.item-action-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
}

.chase-details-snapshots {
    margin-top: var(--spacing-xl);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-lg);
}

.chase-snapshot-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.chase-snapshot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.chase-snapshot-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.snapshot-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(125, 211, 252, 0.7);
    font-weight: 600;
}

.chase-snapshot-header h4 {
    margin: 0;
    color: #7dd3fc;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.snapshot-header-action {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.snapshot-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(125, 211, 252, 0.35);
    background: rgba(15, 23, 42, 0.4);
    color: #e0f2fe;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.snapshot-link:hover {
    border-color: rgba(125, 211, 252, 0.65);
    background: rgba(56, 189, 248, 0.25);
    color: #f8fafc;
    transform: translateY(-1px);
}

.snapshot-link:focus-visible {
    outline: 2px solid rgba(125, 211, 252, 0.85);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .snapshot-header-action {
        width: 100%;
        margin-left: 0;
    }

    .snapshot-link {
        width: 100%;
    }
}

.chase-snapshot-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.snapshot-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(125, 211, 252, 0.15);
}

.snapshot-row + .snapshot-row {
    margin-top: var(--spacing-xs);
}

.snapshot-rank {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.85), rgba(45, 212, 191, 0.85));
    color: var(--background-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.snapshot-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.9);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.snapshot-indicator.pending {
    background: rgba(251, 191, 36, 0.9);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.55);
}

.snapshot-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.snapshot-title {
    margin: 0;
    color: var(--text-light);
    font-weight: 600;
    letter-spacing: 0.4px;
}

.snapshot-meta {
    margin: 0;
    color: rgba(226, 232, 240, 0.85);
    font-size: 0.85rem;
}

.snapshot-note {
    margin: 0;
    color: rgba(226, 232, 240, 0.75);
    font-size: 0.8rem;
    font-style: italic;
}

.snapshot-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.snapshot-pill.success {
    background: rgba(72, 199, 142, 0.2);
    color: #bbf7d0;
    border: 1px solid rgba(72, 199, 142, 0.35);
}

.snapshot-empty,
.snapshot-error {
    margin: 0;
    color: rgba(226, 232, 240, 0.8);
    font-size: 0.9rem;
}

.snapshot-error {
    color: rgba(248, 113, 113, 0.95);
}

.snapshot-footer {
    margin-top: var(--spacing-sm);
    font-style: italic;
}

.snapshot-row .btn {
    justify-self: end;
}

.chase-status-banner {
    margin: var(--spacing-sm) 0;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 600;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: rgba(72, 199, 142, 0.15);
    color: #bbf7d0;
    border: 1px solid rgba(72, 199, 142, 0.35);
}

.chase-status-banner.closed {
    background: rgba(148, 163, 184, 0.15);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.35);
}

.chase-status-banner.completed {
    background: rgba(72, 199, 142, 0.2);
    color: #22c55e;
    border-color: rgba(72, 199, 142, 0.4);
}

.chase-status-banner.locked {
    background: rgba(248, 113, 113, 0.2);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.35);
}

.chase-detail .btn-primary.btn-small {
    align-self: flex-start;
    margin-top: var(--spacing-sm);
    padding: 0.75rem 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    font-size: 0.85rem;
    background: linear-gradient(135deg, var(--primary-teal), var(--accent-green));
    box-shadow: 0 6px 16px rgba(0, 206, 209, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.chase-detail .btn-primary.btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 206, 209, 0.45);
}

.chase-detail .item-footer {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
}

.chase-detail .item-footer .item-status-note {
    color: #e0f2fe;
    font-size: 0.75rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.chase-detail .item-footer .item-status-note.neutral {
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}

.chase-detail .item-footer .item-status-note.success {
    background: rgba(72, 199, 142, 0.25);
    border-color: rgba(72, 199, 142, 0.4);
    color: #bbf7d0;
}

.chase-detail .item-footer .item-status-note.warning {
    background: rgba(253, 186, 116, 0.25);
    border-color: rgba(253, 186, 116, 0.35);
    color: #ffedd5;
}

.chase-detail .item-footer .item-status-note.error {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fee2e2;
}

.chase-detail .item-action-button {
    flex: 1;
    min-width: 160px;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.chase-detail .item-action-button span {
    font-size: 1.1rem;
}

.chase-detail .item-body-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.45), transparent);
}

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .chase-detail .chase-hero {
        grid-template-columns: 1fr;
    }
    
    .chase-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .features {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .chase-detail {
        padding: var(--spacing-lg) var(--spacing-md) var(--spacing-xl);
    }

    .chase-detail .leaderboard-panel,
    .chase-detail .progress-section {
        padding: var(--spacing-lg);
    }

    .leaderboard-featured {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .leaderboard-featured-rank {
        margin: 0 auto;
    }

    .leaderboard-featured-body {
        flex-direction: column;
    }

    .leaderboard-row {
        grid-template-columns: auto 1fr auto;
        gap: var(--spacing-sm);
    }

    .leaderboard-row-status {
        justify-self: flex-end;
    }

    .chase-detail .item-body {
        padding: var(--spacing-md);
    }

    .chase-detail .chase-share-actions {
        flex-direction: column;
    }
}

.qr-code-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.3);
    padding: var(--spacing-sm);
}

.how-it-works {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.how-it-works h2 {
    color: var(--primary-teal);
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.how-it-works-intro {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
}

.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-lg);
}

.how-card {
    background: linear-gradient(160deg, rgba(30, 64, 175, 0.45), rgba(15, 118, 110, 0.35));
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl) var(--spacing-lg);
    box-shadow: 0 14px 35px rgba(2, 6, 23, 0.35);
    position: relative;
    overflow: hidden;
    animation: how-card-float 0.8s ease forwards;
    animation-delay: var(--delay, 0s);
    transform: translateY(20px);
    opacity: 0;
}

.how-card::after {
    content: '';
    position: absolute;
    inset: -40% -40% auto auto;
    background: radial-gradient(circle, rgba(125, 211, 252, 0.35) 0%, transparent 60%);
    width: 180px;
    height: 180px;
    transform: rotate(25deg);
    pointer-events: none;
}

.how-card-illustration {
    width: 84px;
    height: 84px;
    margin: 0 auto var(--spacing-md);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.6);
    display: grid;
    place-items: center;
    font-size: 2.5rem;
    box-shadow: inset 0 0 25px rgba(56, 189, 248, 0.35);
}

.how-card h3 {
    color: #7dd3fc;
    font-size: 1.4rem;
    margin-bottom: var(--spacing-sm);
}

.how-card p {
    color: rgba(226, 232, 240, 0.85);
    line-height: 1.6;
}

.how-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.45);
}

@keyframes how-card-float {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero-mascot {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: var(--spacing-md);
}

.hero-mascot-combined {
    max-width: 380px;
    width: 100%;
    filter: drop-shadow(0 18px 45px rgba(15, 118, 110, 0.45));
}

@keyframes hero-mascot-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

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

.how-mascot {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
}

.how-mascot img {
    max-width: 220px;
    width: 100%;
    filter: drop-shadow(0 18px 40px rgba(15, 23, 42, 0.4));
    animation: hero-mascot-float 6s ease-in-out infinite;
}

/* Join Chase Page */
.join-chase-body {
    min-height: 100vh;
}

.join-chase-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-xxl);
}

.join-chase-hero {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.join-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
}

.join-chase-hero h1 {
    font-size: clamp(2.2rem, 6vw, 3.3rem);
    margin-bottom: var(--spacing-sm);
}

.join-subtitle {
    color: rgba(226, 232, 240, 0.8);
    max-width: 620px;
    margin: 0 auto;
}

.join-chase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.join-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(125, 211, 252, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.45);
}

.join-card h3 {
    margin: 0;
    font-size: 1.5rem;
}

.join-card-subtitle {
    color: rgba(226, 232, 240, 0.75);
    margin: var(--spacing-xs) 0 var(--spacing-md);
}

.join-form .input-group {
    margin-bottom: var(--spacing-md);
}

.join-form input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    color: var(--text-light);
}

.join-form input:focus {
    border-color: var(--primary-teal);
    outline: none;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.dual-input {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--spacing-sm);
}

.chase-summary-card {
    position: relative;
    overflow: hidden;
    padding-bottom: calc(var(--spacing-lg) * 1.2);
}

.chase-summary-loading,
.chase-summary-error {
    text-align: center;
    color: rgba(226, 232, 240, 0.8);
}

.chase-summary-loading p,
.chase-summary-error p {
    margin-top: var(--spacing-sm);
}

.chase-summary-header h2 {
    margin: var(--spacing-xs) 0;
}

.summary-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.8);
    margin: 0;
}

.chase-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.2);
    color: #e0f2fe;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.summary-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.summary-details dt {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.9);
}

.summary-details dd {
    margin: 0.2rem 0 0;
    font-size: 1rem;
    color: var(--text-light);
}

.chase-password-note {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    color: #fde68a;
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .join-chase-wrapper {
        padding: var(--spacing-lg) var(--spacing-sm) var(--spacing-xl);
    }
}

.promo-video {
    margin-top: var(--spacing-xl);
    text-align: center;
}

.promo-video h2 {
    color: var(--primary-teal);
    font-size: 2.2rem;
    margin-bottom: var(--spacing-sm);
}

.promo-video p {
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto var(--spacing-lg);
}

.promo-video-frame {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.4);
}

.promo-video-frame video {
    width: 100%;
    display: block;
    background: rgba(15, 23, 42, 0.6);
}

.promo-video-frame video:focus {
    outline: 2px solid var(--accent-green);
    outline-offset: 4px;
}

.btn-primary,
.btn-secondary,
.btn-outline {
    min-height: 48px;
}

@media (max-width: 768px) {
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        min-height: 52px;
        font-size: 1rem;
    }
}

 /* Dashboard */
 .dashboard {
     padding: var(--spacing-lg) var(--spacing-xl);
 }

.leaderboard-stack {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.leaderboard-card {
    position: relative;
    background: rgba(248, 250, 252, 0.96);
    border-radius: 22px;
    padding: 0.9rem 1.1rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "rank main score";
    align-items: center;
    gap: var(--spacing-md);
    box-shadow: 0 18px 35px rgba(12, 23, 64, 0.22);
}

.leaderboard-card.rank-1 {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.9));
}

.leaderboard-card-left {
    grid-area: rank;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.leaderboard-rank-badge {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.2);
    background: linear-gradient(140deg, rgba(56, 189, 248, 0.25), rgba(14, 165, 233, 0.4));
}

.leaderboard-card.rank-1 .leaderboard-rank-badge {
    background: linear-gradient(140deg, #facc15, #f97316);
    box-shadow: 0 16px 30px rgba(250, 204, 21, 0.35);
}

.leaderboard-card.rank-2 .leaderboard-rank-badge {
    background: linear-gradient(140deg, #cbd5f5, #93c5fd);
}

.leaderboard-card.rank-3 .leaderboard-rank-badge {
    background: linear-gradient(140deg, #fbbf24, #fb923c);
}

.leaderboard-rank-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.85rem;
    color: rgba(30, 41, 59, 0.7);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.leaderboard-rank-label {
    font-weight: 700;
    color: #1f2937;
}

.leaderboard-card-main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.leaderboard-player-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.leaderboard-player-status {
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(30, 41, 59, 0.55);
}

.leaderboard-duration {
    font-size: 0.8rem;
    color: rgba(30, 41, 59, 0.5);
}

.leaderboard-score-badge {
    grid-area: score;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(14, 165, 233, 0.9));
    color: #f8fafc;
    padding: 0.65rem 1rem;
    border-radius: 16px;
    min-width: 90px;
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.35);
}

.leaderboard-score-badge .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.leaderboard-score-badge .value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.leaderboard-lock-notice {
    text-align: center;
    color: rgba(226, 232, 240, 0.75);
    padding: var(--spacing-sm);
}

.leaderboard-empty {
    padding: var(--spacing-md);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px dashed rgba(148, 163, 184, 0.3);
    color: rgba(226, 232, 240, 0.7);
    text-align: center;
}

@media (max-width: 768px) {
    .leaderboard-card {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        grid-template-areas:
            "rank main"
            "status score";
        align-items: center;
        column-gap: var(--spacing-sm);
        row-gap: 0.35rem;
        padding: 0.75rem 0.9rem;
        text-align: left;
    }

    .leaderboard-card-left {
        justify-content: flex-start;
    }

    .leaderboard-rank-info {
        display: none;
    }

    .leaderboard-card-main {
        display: contents;
    }

    .leaderboard-player-name {
        grid-area: main;
        font-size: 0.95rem;
        align-self: center;
        justify-self: flex-start;
    }

    .leaderboard-player-status {
        grid-area: status;
        font-size: 0.75rem;
        letter-spacing: 0.03em;
        margin-top: 0;
        justify-self: flex-start;
    }

    .leaderboard-score-badge {
        grid-area: score;
        flex-direction: row;
        align-items: center;
        justify-self: flex-end;
        min-width: auto;
        padding: 0.35rem 0.65rem;
        gap: 0.35rem;
        border-radius: 999px;
    }

    .leaderboard-score-badge .label {
        font-size: 0.7rem;
    }

    .leaderboard-score-badge .value {
        font-size: 1.1rem;
    }

    .leaderboard-duration {
        display: none;
    }

    .leaderboard-rank-badge {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        font-size: 1.4rem;
    }
}

