/* ============================================================
   TCAM FX — inner pages (about, management, contact, gallery,
   tournaments, search, registration, success, coach login, errors)
   Requires css/fx.css + js/fx.js. Style only; markup/text unchanged.
   Each block is scoped by a class/ID that exists only on its page.
   ============================================================ */

/* Shared inner-page card look */
.about-section, .management-section, .committee-section, .contact-details, .search-container, .result-card,
.featured, .grid > .card, .dropdown-section {
    position: relative; isolation: isolate; border-radius: 30px; border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018) 60%) !important;
    box-shadow: 0 30px 70px -35px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
/* Cards with a gradient frame (forms, featured items) */
.contact-form, #enhancedRegistrationForm, .search-container, .featured, body > .card {
    border: 1px solid transparent !important;
    background: linear-gradient(rgba(17, 13, 34, 0.9), rgba(17, 13, 34, 0.9)) padding-box, var(--grad) border-box !important;
    box-shadow: 0 50px 100px -40px rgba(255, 61, 110, 0.4) !important;
}
.back-link, a.back-link { display: inline-flex; color: var(--muted) !important; font-weight: 600; margin-bottom: 1rem; }
.subtitle { color: var(--muted); }

/* ── About ──────────────────────────────────────────────── */
.about-container { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.about-subtitle {
    position: relative; max-width: 920px; margin: 0 auto clamp(3rem, 6vw, 4.5rem) !important; padding-top: 2rem; text-align: center;
    color: var(--text); font-size: clamp(1.12rem, 2vw, 1.42rem); line-height: 1.75; font-weight: 500;
}
.about-subtitle::before { content: ''; position: absolute; top: 0; left: 50%; width: 80px; height: 3px; margin-left: -40px; border-radius: 3px; background: var(--grad); }
.about-section { margin-bottom: 2rem; padding: clamp(1.6rem, 4.5vw, 3.2rem); }
.about-section h2 {
    position: relative; margin-bottom: 1.4rem; padding-bottom: 0.9rem;
    font-size: clamp(1.6rem, 3.4vw, 2.6rem); letter-spacing: -0.03em; color: var(--text);
}
.about-section h2::after { content: ''; position: absolute; left: 0; bottom: 0; width: 64px; height: 3px; border-radius: 3px; background: var(--grad); }
.about-section p { color: var(--muted); font-size: 1.04rem; line-height: 1.8; }
.about-section ul, .about-vision ul, .achievements ul { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 0.7rem; }
.about-section ul li, .about-vision ul li, .achievements ul li {
    position: relative; padding: 0.85rem 1rem 0.85rem 3rem; border-radius: 16px; background: var(--glass); border: 1px solid var(--line);
    color: var(--text); line-height: 1.55;
}
.about-section ul li::before, .about-vision ul li::before, .achievements ul li::before {
    content: ''; position: absolute; left: 0.95rem; top: 0.95rem; width: 20px; height: 20px; border-radius: 50%; background: var(--grad-ball); box-shadow: 0 0 14px rgba(217, 255, 63, 0.45);
}
.about-section ul li::after, .about-vision ul li::after, .achievements ul li::after {
    content: ''; position: absolute; left: calc(0.95rem + 7px); top: calc(0.95rem + 4px); width: 5px; height: 9px;
    border-right: 2px solid #0b0f04; border-bottom: 2px solid #0b0f04; transform: rotate(45deg);
}
.about-person-layout { display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.about-person-photo {
    position: sticky; top: calc(var(--header-h) + 24px); border-radius: 26px !important;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--line-2) !important;
    transform: translateY(var(--fx-py, 0px)); transition: transform 0.6s var(--ease);
}
.about-message, .about-message2 {
    position: relative; margin: 1.6rem 0; padding: 1.5rem 1.6rem 1.5rem 1.9rem; border-radius: 20px; overflow: hidden;
    background: linear-gradient(120deg, rgba(255, 122, 26, 0.13), rgba(124, 92, 255, 0.1)); border: 1px solid rgba(255, 140, 80, 0.25);
    color: var(--text); font-style: italic; line-height: 1.8;
}
.about-message::before, .about-message2::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.about-message-title { margin-bottom: 0.6rem; font-family: var(--f-mono); font-style: normal; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.12em; color: var(--saffron); }
.about-vision { margin-top: 1.6rem; padding: clamp(1.3rem, 3vw, 2rem); border-radius: 24px; background: rgba(124, 92, 255, 0.07); border: 1px solid rgba(124, 92, 255, 0.25); }
.about-vision h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
#leaderFilterNotice { padding: 1rem 1.2rem; border-radius: 16px; background: var(--glass); border: 1px solid var(--line-2); }
#leaderFilterNotice a { color: var(--saffron) !important; font-weight: 700; }

/* ── Management ─────────────────────────────────────────── */
.container:has(.management-section) { max-width: 1120px; }
.dropdown-section { padding: 0.6rem; margin-bottom: 1rem !important; border-radius: 22px; }
.dropdown-btn {
    position: relative; width: 100%; display: flex; align-items: center; justify-content: space-between; cursor: pointer;
    padding: 1.1rem 1.4rem; border: 0; border-radius: 16px; text-align: left;
    background: linear-gradient(120deg, rgba(255, 122, 26, 0.16), rgba(124, 92, 255, 0.12)); color: var(--text);
    font: 700 1.05rem var(--f-display); letter-spacing: -0.01em; transition: background 0.4s, transform 0.4s var(--ease);
}
.dropdown-btn:hover { background: linear-gradient(120deg, rgba(255, 122, 26, 0.3), rgba(124, 92, 255, 0.22)); transform: translateY(-2px); }
.dropdown-content { padding: 1rem 0.8rem 0.4rem; }
.dropdown-content ul li { padding: 0.5rem 0.4rem; color: var(--text); border-bottom: 1px solid var(--line); }
.district-link { color: var(--muted) !important; font-weight: 600; transition: color 0.3s, padding 0.3s var(--ease); }
.district-link:hover { color: var(--saffron) !important; padding-left: 6px; }
.management-section { margin: 2rem 0; padding: clamp(1.6rem, 4.5vw, 3rem); color: var(--muted); }
.management-section .section-title, .committee-section .section-title {
    position: relative; margin-bottom: 1.6rem; padding-bottom: 0.9rem;
    font-family: var(--f-display); font-weight: 700; font-size: clamp(1.5rem, 3.2vw, 2.4rem); line-height: 1.1; letter-spacing: -0.03em;
    color: var(--text) !important; background: none !important; -webkit-text-fill-color: currentColor !important; text-align: left;
}
.management-section .section-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 64px; height: 3px; border-radius: 3px; background: var(--grad); }
.management-list { list-style: none; padding: 0; margin: 0 0 1.8rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.8rem; }
.management-list li {
    padding: 1.1rem 1.2rem; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); color: var(--text);
    transition: transform 0.4s var(--ease), border-color 0.3s;
}
.management-list li:hover { transform: translateY(-4px); border-color: rgba(255, 122, 26, 0.45); }
.management-list li strong { display: block; margin-bottom: 0.25rem; font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--saffron); }
.management-section > div:not(.section-title):not(.achievements) { line-height: 1.8; }
.management-section strong { color: var(--text); }
.apply-btn {
    display: inline-flex; margin-top: 1rem; padding: 0.85rem 1.5rem; border-radius: var(--pill); color: #fff !important; font-weight: 800;
    background: var(--grad-wide); background-size: 300% 100%; animation: fx-grad-pan 9s linear infinite;
    box-shadow: 0 14px 34px -12px rgba(255, 61, 110, 0.8); transition: transform 0.4s var(--ease);
}
.apply-btn:hover { transform: translateY(-3px); }
.achievements { margin-top: 2rem; padding: 1.5rem; border-radius: 22px; background: rgba(217, 255, 63, 0.04); border: 1px solid rgba(217, 255, 63, 0.18); }
.achievements > strong { font-family: var(--f-display); font-size: 1.1rem; }
.committee-section { margin: 2rem 0; padding: clamp(1.6rem, 4.5vw, 3rem); overflow: hidden; }
.ribbon {
    position: absolute; top: 26px; right: -48px; width: 190px; padding: 0.45rem 0; transform: rotate(45deg); text-align: center;
    background: var(--grad); box-shadow: 0 10px 30px rgba(255, 61, 110, 0.5); z-index: 2;
}
.ribbon span { font-family: var(--f-display); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.2em; color: #fff; }
.committee-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.committee-table th {
    padding: 0.6rem 1.2rem; text-align: left; font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.14em; color: var(--saffron) !important;
    background: none !important; border: 0 !important;
}
.committee-table td { padding: 1rem 1.2rem; background: var(--glass) !important; color: var(--text) !important; border: 0 !important; transition: background 0.3s; }
.committee-table td:first-child { border-radius: 14px 0 0 14px; font-weight: 700; }
.committee-table td:last-child { border-radius: 0 14px 14px 0; color: var(--muted) !important; }
.committee-table tbody tr { transition: transform 0.4s var(--ease); }
.committee-table tbody tr:hover { transform: translateX(8px); }
.committee-table tbody tr:hover td { background: linear-gradient(90deg, rgba(255, 122, 26, 0.18), rgba(124, 92, 255, 0.12)) !important; }
/* District modal: hidden until shown (functional rule kept from the original page) */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 3000; align-items: center; justify-content: center; padding: 1rem; background: rgba(5, 4, 12, 0.78); backdrop-filter: blur(12px); }
.modal-content {
    position: relative; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: clamp(1.4rem, 4vw, 2.4rem); border-radius: 28px; border: 1px solid transparent;
    background: linear-gradient(rgba(20, 15, 40, 0.97), rgba(20, 15, 40, 0.97)) padding-box, var(--grad) border-box; animation: fx-pop 0.6s var(--ease-back);
}
.modal-close { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; background: var(--glass-2); font-size: 1.5rem; }
#modalDistrictName { font-size: 1.6rem; margin-bottom: 1rem; }
.contact-info p { margin: 0.4rem 0; color: var(--muted); }
.modal-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.2rem; }
.action-btn { flex: 1; text-align: center; padding: 0.8rem 1rem; border-radius: var(--pill); font-weight: 700; background: var(--glass-2); border: 1px solid var(--line-2); }
.call-btn { background: var(--grad); border-color: transparent; }
@keyframes fx-pop { from { opacity: 0; transform: translateY(40px) scale(0.92); } to { opacity: 1; transform: none; } }

/* ── Contact ────────────────────────────────────────────── */
.contact-flex { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1.2rem, 3vw, 2rem); align-items: start; }
.contact-details { padding: clamp(1.6rem, 4vw, 2.8rem); }
.contact-details h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 1.4rem; }
.contact-details p { color: var(--muted); line-height: 1.75; margin-bottom: 1.1rem; }
.contact-details p b { display: block; margin-bottom: 0.15rem; font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.1em; color: var(--saffron); }
.contact-details p a[href^="mailto"], .contact-details p a[href^="tel"] { color: var(--text) !important; font-weight: 700; border-bottom: 1px solid rgba(255, 122, 26, 0.5); transition: color 0.3s; word-break: break-word; }
.contact-details p a[href^="mailto"]:hover, .contact-details p a[href^="tel"]:hover { color: var(--saffron) !important; }
.contact-details a[target="_blank"] {
    display: flex !important; align-items: center; gap: 10px; width: fit-content; max-width: 100%; margin: 0.6rem 0 0 !important; padding: 0.5rem 1rem 0.5rem 0.5rem;
    border-radius: var(--pill); background: var(--glass); border: 1px solid var(--line); color: var(--text) !important; font-weight: 600; font-size: 0.92rem;
    transition: transform 0.4s var(--ease-back), border-color 0.3s, background 0.3s; overflow-wrap: anywhere;
}
.contact-details a[target="_blank"] img { width: 30px !important; height: 30px !important; margin: 0 !important; border-radius: 50%; }
.contact-details a[target="_blank"]:hover { transform: translateX(6px); border-color: var(--saffron); background: rgba(255, 122, 26, 0.1); }
.contact-form { padding: clamp(1.6rem, 4vw, 2.6rem); border-radius: 30px; }
.contact-form label { margin-top: 0.4rem; }
.contact-form input, .contact-form textarea { margin-bottom: 0.9rem; }
.contact-form button[type="submit"] {
    position: relative; overflow: hidden; width: 100%; margin-top: 0.4rem; padding: 1.1rem 1.6rem; border: 0; border-radius: var(--pill); cursor: pointer;
    background: var(--grad-wide); background-size: 300% 100%; color: #fff; font: 800 1.02rem var(--f-body);
    box-shadow: 0 14px 36px -12px rgba(255, 61, 110, 0.85); animation: fx-grad-pan 9s linear infinite; transition: transform 0.4s var(--ease);
}
.contact-form button[type="submit"]:hover { transform: translateY(-3px); }
.contact-success { display: none; margin-top: 1rem; padding: 0.9rem 1rem; border-radius: 14px; background: rgba(61, 255, 197, 0.1); border: 1px solid rgba(61, 255, 197, 0.35); color: var(--mint); text-align: center; }
.popup-overlay { display: none; position: fixed; inset: 0; z-index: 3000; align-items: center; justify-content: center; background: rgba(5, 4, 12, 0.8); backdrop-filter: blur(12px); }
.popup-overlay.active { display: flex; }
.popup-message {
    position: relative; width: min(420px, 92vw); padding: 2.4rem 2rem; border-radius: 30px; text-align: center; color: var(--text); font-weight: 700; font-size: 1.1rem; line-height: 1.6;
    border: 1px solid transparent; background: linear-gradient(rgba(20, 15, 40, 0.97), rgba(20, 15, 40, 0.97)) padding-box, var(--grad) border-box;
    animation: fx-pop 0.6s var(--ease-back);
}
.close-popup { position: absolute; top: 12px; right: 16px; font-size: 1.6rem; cursor: pointer; color: var(--muted); }

/* ── Gallery page ───────────────────────────────────────── */
.container:has(#mainGallery) { max-width: 1440px; }
.filter-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-bottom: 2rem; }
.filter-tab { padding: 0.6rem 1.2rem; border-radius: var(--pill); border: 1px solid var(--line-2); background: var(--glass); color: var(--muted); font-weight: 700; cursor: pointer; transition: all 0.3s; }
.filter-tab:hover { color: var(--text); border-color: var(--saffron); }
.filter-tab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 10px 26px -8px rgba(255, 61, 110, 0.8); }
#mainGallery.gallery-grid { display: block !important; column-count: 4; column-gap: 16px; }
#mainGallery .gallery-item {
    position: relative; break-inside: avoid; margin: 0 0 16px; overflow: hidden; border-radius: 22px; cursor: zoom-in; height: auto !important;
    border: 1px solid var(--line); background: var(--bg-3);
}
#mainGallery .gallery-item img { display: block; width: 100%; height: auto !important; object-fit: cover; transition: transform 1s var(--ease), filter 0.6s; }
#mainGallery .gallery-item:hover img { transform: scale(1.1) rotate(1deg); filter: saturate(1.2); }
#mainGallery .gallery-item .overlay {
    position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 1rem; color: #fff; font-weight: 700; opacity: 0; transition: opacity 0.5s;
    background: linear-gradient(180deg, transparent 45%, rgba(255, 61, 110, 0.55));
}
#mainGallery .gallery-item:hover .overlay { opacity: 1; }
.fx-js #mainGallery .gallery-item.reveal { clip-path: inset(30% 0 0 0 round 22px); transition: opacity 0.9s var(--ease), transform 1s var(--ease), clip-path 1.1s var(--ease); }
.fx-js #mainGallery .gallery-item.reveal.is-visible { clip-path: inset(0 0 0 0 round 22px); }
.container:has(#mainGallery) .section-title {
    display: flex; align-items: center; gap: 10px; margin: 2rem 0 1rem; font-family: var(--f-mono); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.14em; color: var(--saffron);
}
.lightbox .nav-btn {
    position: absolute; top: 50%; width: 56px; height: 56px; margin-top: -28px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
    background: var(--glass-2); border: 1px solid var(--line-2); color: #fff; font-size: 1.4rem; transition: background 0.3s, transform 0.4s var(--ease-back);
}
.lightbox .nav-btn:hover { background: var(--grad); transform: scale(1.1); }
.lightbox .prev { left: 2vw; } .lightbox .next { right: 2vw; }

/* ── Tournaments ────────────────────────────────────────── */
.container:has(.featured), .container:has(> .grid), .container:has(> .empty) { max-width: var(--wrap); }
.featured { overflow: hidden; margin-bottom: 2.5rem; padding: clamp(1.6rem, 4.5vw, 3.2rem); border-radius: 34px; }
.featured::after {
    content: ''; position: absolute; z-index: -1; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, rgba(255, 255, 230, 0.6), transparent 22%), radial-gradient(circle, rgba(217, 255, 63, 0.45), rgba(61, 255, 197, 0.1) 55%, transparent 70%);
    opacity: 0.55; animation: fx-float 7s ease-in-out infinite;
}
.featured .tag {
    display: inline-flex; margin-bottom: 1.2rem; padding: 0.45rem 0.95rem; border-radius: var(--pill);
    font-family: var(--f-mono); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; color: #0b0f04; background: var(--grad-ball);
    box-shadow: 0 0 24px rgba(217, 255, 63, 0.4);
}
.featured h2 { font-size: clamp(1.5rem, 3.4vw, 2.6rem); line-height: 1.2; margin-bottom: 0.9rem; max-width: 900px; }
.featured .desc { color: var(--muted); font-size: 1.05rem; max-width: 820px; }
.featured-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.8rem; margin: 1.8rem 0; }
.featured-meta > div { padding: 1.1rem 1.2rem; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); transition: transform 0.4s var(--ease), border-color 0.3s; }
.featured-meta > div:hover { transform: translateY(-4px); border-color: rgba(255, 122, 26, 0.45); }
.featured-meta .icon:empty { display: none; }
.featured-meta .label { font-family: var(--f-mono); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; color: var(--saffron); margin-bottom: 0.3rem; }
.featured-meta .value { color: var(--text); font-weight: 700; }
.btn-register, .apply-btn.btn-register {
    display: inline-flex; align-items: center; justify-content: center; padding: 1.05rem 1.8rem; border-radius: var(--pill); color: #fff !important; font-weight: 800;
    background: var(--grad-wide); background-size: 300% 100%; animation: fx-grad-pan 9s linear infinite;
    box-shadow: 0 14px 36px -12px rgba(255, 61, 110, 0.85); transition: transform 0.4s var(--ease);
}
.btn-register:hover { transform: translateY(-3px); }
.featured-image { overflow: hidden; border-radius: 22px; margin-bottom: 1.5rem; }
.featured-image img { width: 100%; display: block; transition: transform 1s var(--ease); }
.featured-image:hover img { transform: scale(1.05); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.grid > .card { display: flex; flex-direction: column; padding: 1.6rem; overflow: hidden; }
.card-image { margin: -1.6rem -1.6rem 1.2rem; overflow: hidden; aspect-ratio: 16 / 9; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.grid > .card:hover .card-image img { transform: scale(1.08); }
.status-tag { align-self: flex-start; margin-bottom: 0.9rem; padding: 0.35rem 0.8rem; border-radius: var(--pill); font-family: var(--f-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; }
.status-upcoming { color: #0b0f04; background: var(--grad-ball); }
.status-ongoing { color: #fff; background: var(--grad); animation: fx-ping-o 2s infinite; }
.status-completed { color: var(--muted); background: var(--glass-2); }
@keyframes fx-ping-o { 0% { box-shadow: 0 0 0 0 rgba(255, 61, 110, 0.6); } 70%, 100% { box-shadow: 0 0 0 10px rgba(255, 61, 110, 0); } }
.grid > .card h3 { font-size: 1.15rem; }
.grid > .card .meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.3rem; }
.grid > .card .footer { margin-top: auto; padding-top: 1rem; display: flex; align-items: center; justify-content: space-between; }
.grid > .card .apply-btn { margin-top: 0; padding: 0.6rem 1.2rem; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); border-radius: 26px; border: 1px dashed var(--line-2); }

/* ── Student search ─────────────────────────────────────── */
.container:has(.search-container) { max-width: 980px; }
.search-container { padding: clamp(1.6rem, 4vw, 2.6rem); border-radius: 30px; margin-bottom: 2rem; }
.search-container form { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0 1rem; align-items: end; }
.search-container form > * { min-width: 0; }
.search-container form > button, .search-container form > .btn { grid-column: 1 / -1; }
.search-container p[style] { color: var(--dim) !important; text-align: center; }
.btn, .btn-small {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; cursor: pointer; border: 0; border-radius: var(--pill);
    padding: 1rem 1.6rem; font: 800 0.98rem var(--f-body); color: #fff !important; transition: transform 0.4s var(--ease), box-shadow 0.3s, background 0.3s;
}
.btn-primary { width: 100%; background: var(--grad-wide); background-size: 300% 100%; animation: fx-grad-pan 9s linear infinite; box-shadow: 0 14px 36px -12px rgba(255, 61, 110, 0.85); }
.btn-secondary { background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn:hover, .btn-small:hover { transform: translateY(-3px); }
.btn-small { padding: 0.6rem 1.1rem; font-size: 0.85rem; }
.btn-success { background: linear-gradient(120deg, #1fbf75, #3dffc5); color: #04140c !important; }
.btn-info { background: linear-gradient(120deg, #4f7cff, #7c5cff); }
.btn-danger { background: linear-gradient(120deg, #ff3d6e, #ff7a1a); }
.message { padding: 1rem 1.2rem; border-radius: 16px; margin-bottom: 1.2rem; font-weight: 600; border: 1px solid var(--line-2); background: var(--glass); }
.message.success { border-color: rgba(61, 255, 197, 0.4); background: rgba(61, 255, 197, 0.08); color: var(--mint); }
.message.error { border-color: rgba(255, 61, 110, 0.45); background: rgba(255, 61, 110, 0.1); color: #ff9db5; }
.results-container h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
.result-card { margin-bottom: 1.2rem; padding: clamp(1.3rem, 3.5vw, 2rem); }
.result-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.result-title { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; }
.result-card .photo, .result-header img { width: 84px; height: 84px; border-radius: 20px; object-fit: cover; border: 2px solid rgba(255, 122, 26, 0.5); box-shadow: 0 10px 30px -8px rgba(255, 61, 110, 0.6); transition: transform 0.6s var(--ease-back); }
.result-card:hover .photo { transform: rotate(-4deg) scale(1.06); }
.result-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.7rem; }
.info-item { padding: 0.8rem 1rem; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); color: var(--text); }
.info-label { display: block; font-family: var(--f-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; color: var(--saffron); }
.result-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }

/* ── Update registration (single-registration-enhanced) ─── */
.container:has(#enhancedRegistrationForm) { position: relative; z-index: 2; max-width: 900px; }
.search-existing {
    margin-bottom: 1.6rem !important; padding: clamp(1.3rem, 3.5vw, 2rem) !important; border-radius: 26px !important;
    border: 1px solid rgba(255, 140, 80, 0.35) !important; background: linear-gradient(120deg, rgba(255, 122, 26, 0.12), rgba(124, 92, 255, 0.1)) !important;
}
.search-existing h3 { font-family: var(--f-display) !important; font-size: 1.15rem !important; }
.search-existing select, .search-existing input {
    padding: 0.95rem 1.1rem !important; border-radius: 14px !important; border: 1px solid var(--line-2) !important; background-color: rgba(7, 6, 12, 0.6) !important; color: var(--text) !important;
}
.search-existing select { padding-right: 2.6rem !important; }
.search-existing button {
    padding: 0.95rem 1.8rem !important; border-radius: var(--pill) !important; border: 0 !important; cursor: pointer;
    background: var(--grad) !important; color: #fff !important; font-weight: 800 !important; box-shadow: 0 12px 30px -10px rgba(255, 61, 110, 0.8) !important;
}
#enhancedRegistrationForm { padding: clamp(1.4rem, 4vw, 2.6rem); border-radius: 32px; }
#enhancedRegistrationForm h3 { position: relative; margin-top: 1.8rem !important; padding-left: 16px; font-family: var(--f-display); font-size: 1.15rem; }
#enhancedRegistrationForm h3:first-of-type { margin-top: 0 !important; }
#enhancedRegistrationForm h3::before { content: ''; position: absolute; left: 0; top: 0.15em; bottom: 0.15em; width: 4px; border-radius: 4px; background: var(--grad); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-group.full-width { grid-column: 1 / -1; }
.required { color: var(--flame); }
.photo-preview, #photoPreview img { max-width: 150px; max-height: 150px; margin-top: 10px; border-radius: 14px; border: 2px solid var(--line-2); }

/* ── Registration success (ID card stays exactly as before) ─ */
.container:has(#idCard) { max-width: 520px; margin: 0 auto; padding: calc(var(--header-h) + 3rem) 1.5rem 3rem; }
#idCard {
    color: #000; font-family: 'Inter', Arial, sans-serif; font-size: 16px; line-height: normal; letter-spacing: normal;
    -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;
    box-shadow: 0 40px 100px -20px rgba(255, 61, 110, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
    transition: transform 0.5s var(--ease), box-shadow 0.5s;
}
#idCard:hover { transform: translateY(-6px) rotate(-0.6deg); }
#idCard *, #idCard b, #idCard strong { font-family: inherit; letter-spacing: normal; -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; }
#idCard b, #idCard strong { color: inherit; font-weight: bold; }
#idCard img { max-width: none; }
#idCard + .download-btn, .download-btn {
    position: relative; overflow: hidden; width: 100%; padding: 1.1rem 1.6rem; border: 0; border-radius: var(--pill); cursor: pointer;
    background: var(--grad-wide); background-size: 300% 100%; color: #fff; font: 800 1.05rem var(--f-body);
    box-shadow: 0 14px 36px -12px rgba(255, 61, 110, 0.85); animation: fx-grad-pan 9s linear infinite; transition: transform 0.4s var(--ease);
}
.download-btn:hover { transform: translateY(-3px); }

/* ── Coach login ────────────────────────────────────────── */
body > .card { position: relative; max-width: 480px; margin: calc(var(--header-h) + clamp(2.5rem, 7vw, 5rem)) auto 4rem; padding: clamp(1.6rem, 5vw, 2.6rem); border-radius: 32px; }
body > .card::before {
    content: ''; position: absolute; z-index: -1; inset: -40% -30% auto auto; width: 320px; height: 320px; border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 92, 255, 0.35), transparent 70%); filter: blur(20px); pointer-events: none;
}
body > .card h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin-bottom: 0.5rem; letter-spacing: -0.03em; }
body > .card > p { color: var(--muted); }
.toggle-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 1.4rem 0; padding: 5px; border-radius: var(--pill); background: var(--glass); border: 1px solid var(--line); }
.toggle-row button { padding: 0.75rem 1rem; border: 0; border-radius: var(--pill); cursor: pointer; background: transparent; color: var(--muted); font: 700 0.95rem var(--f-body); transition: background 0.4s, color 0.3s; }
.toggle-row button.active { background: var(--grad); color: #fff; box-shadow: 0 10px 26px -10px rgba(255, 61, 110, 0.8); }
.form-section { display: none; }
.form-section.active { display: block; animation: fx-pop 0.5s var(--ease); }
body > .card form input { margin-bottom: 1rem; }
body > .card form button[type="submit"] {
    width: 100%; margin-top: 0.4rem; padding: 1.05rem 1.6rem; border: 0; border-radius: var(--pill); cursor: pointer;
    background: var(--grad-wide); background-size: 300% 100%; color: #fff; font: 800 1rem var(--f-body);
    box-shadow: 0 14px 36px -12px rgba(255, 61, 110, 0.85); animation: fx-grad-pan 9s linear infinite; transition: transform 0.4s var(--ease);
}
body > .card form button[type="submit"]:hover { transform: translateY(-3px); }
body > .card .error { padding: 0.9rem 1rem; margin-bottom: 1rem; border-radius: 14px; background: rgba(255, 61, 110, 0.12); border: 1px solid rgba(255, 61, 110, 0.45); color: #ffb3c5; }
body > .card .note { margin-top: 1.2rem; padding: 1rem; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; }

/* ── 404 / 500 ──────────────────────────────────────────── */
.error-container {
    position: relative; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem;
}
.error-container::before {
    content: ''; position: absolute; z-index: -1; top: 14%; right: 16%; width: clamp(120px, 18vw, 220px); aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle at 30% 26%, rgba(255, 255, 230, 0.95), transparent 24%), radial-gradient(circle, #e3ff52, #8fb412 78%, #5e7808);
    box-shadow: 0 0 80px rgba(217, 255, 63, 0.45); animation: fx-float 6s ease-in-out infinite;
}
.error-code {
    margin: 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(6rem, 22vw, 14rem); line-height: 0.9; letter-spacing: -0.06em;
    background: var(--grad-wide); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
    animation: fx-grad-pan 8s linear infinite; filter: drop-shadow(0 20px 60px rgba(255, 61, 110, 0.4));
}
.error-message { font-size: clamp(1.4rem, 3.5vw, 2.2rem); margin: 1rem 0 0.6rem; }
.error-description { max-width: 520px; color: var(--muted); margin-bottom: 2rem; }
.home-button {
    display: inline-flex; padding: 1.05rem 1.9rem; border-radius: var(--pill); color: #fff !important; font-weight: 800;
    background: var(--grad-wide); background-size: 300% 100%; animation: fx-grad-pan 9s linear infinite; box-shadow: 0 14px 36px -12px rgba(255, 61, 110, 0.85);
}

/* Shared container rhythm for inner pages */
.tcam-hero ~ .container, .tcam-hero ~ .about-container { position: relative; z-index: 2; padding-bottom: 1rem; }
.container { max-width: var(--wrap); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .about-person-layout, .contact-flex { grid-template-columns: 1fr; }
    .about-person-photo { position: relative; top: 0; max-width: 420px; }
    #mainGallery.gallery-grid { column-count: 3; }
}
@media (max-width: 640px) {
    #mainGallery.gallery-grid { column-count: 2; column-gap: 10px; }
    #mainGallery .gallery-item { margin-bottom: 10px; border-radius: 16px; }
    .form-row, .search-container form { grid-template-columns: 1fr; }
    .committee-table td, .committee-table th { padding: 0.8rem 0.9rem; }
    .ribbon { right: -58px; top: 18px; }
    .lightbox .nav-btn { width: 46px; height: 46px; }
}
