/* ================== VARIABLES ================== */
:root {
    --accent: #3b82f6;
    --accent-soft: #3b82f640;
    --accent-strong: #06b6d4;
    --text-main: #e5e7eb;
    --text-muted: #b1d9fb;
    --error: #f97373;
    --success: #22c55e;
    --border: #1f2937;
}

/* ================== BASE ================== */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at top, #1e3a8a 0, #020617 55%, #020617 100%);
    color: var(--text-main);
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================== HERO ================== */
.hero {
    max-width: 980px;
    margin: 0 auto 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40px; left: -100px; right: -100px; bottom: -50px;
    background-image: url('tdoty.png');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 90%);
    z-index: -1;
}

.hero p { text-shadow: 0 1px 8px rgba(0,0,0,0.7), 0 2px 15px rgba(0,0,0,0.5); }
.hero-inner { display: flex; flex-direction: column; }
.hero-copy { text-align: left; }

.hero-sub {
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1.8rem;
    color: var(--text-muted);
    max-width: 600px;
    text-align: center;
    margin: 0 auto;
}

.hero-sub strong { color: #e5e7eb; }
.vote-now-wrap { margin-top: 16px; }

@media (max-width: 599px) {
    .hero::before { top: -30px; left: 0; right: 0; bottom: -30px; }
    .hero-sub { font-size: 1.4rem !important; line-height: 1.3rem !important; }
}

@media (min-width: 768px) {
    .hero-inner { flex-direction: row; align-items: center; }
    .hero-copy { flex: 1; }
}

/* ================== VOTE NOW BUTTON ================== */
.vote-now-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #0b1120;
    box-shadow: 0 6px 20px rgba(37,99,235,0.45);
    transition: transform 0.08s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.vote-now-text span.icon { font-size: 1.15rem; margin-left: 6px; }

.vote-now-text:active {
    transform: translateY(1px);
    box-shadow: 0 4px 16px rgba(15,23,42,0.65);
    filter: brightness(0.98);
}

/* ================== INFO / CONTENT BLOCKS ================== */
.info {
    max-width: 980px;
    margin: 0 auto 32px;
    padding: 0 16px 16px;
}

.info-block {
    max-width: 620px;
    margin: 0 auto;
    background: radial-gradient(circle at top left, rgba(59,130,246,0.24), #020617);
    border-radius: 16px;
    border: 1px solid rgba(55,65,81,0.9);
    padding: 14px 16px;
    box-shadow: 0 18px 45px rgba(15,23,42,0.85);
}

.hof-section {
    max-width: 620px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 24px 16px 28px;
}

.info-block h2 {
    font-size: .9rem;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
}

.info-block p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 6px;
}

@media (max-width: 599px) {
    .info { max-width: 100vw; overflow-x: hidden; }
    .info-block { max-width: 100%; }
	    .hof-section { max-width: 100%; }
}

/* ================== MODAL / OVERLAY ================== */
body.modal-open { overflow: hidden; }

.overlay {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.overlay.open { display: block; }

.overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.overlay-card {
    position: relative;
    max-width: 500px;
    margin: 20px auto;
    padding: 0 14px;
    z-index: 1001;
}

.overlay-close {
    position: absolute;
    top: -10px; right: 10px;
    width: 28px; height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.5);
    background: rgba(15,23,42,0.95);
    color: #e5e7eb;
    font-size: 18px;
    line-height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.7);
    z-index: 1002;
}

/* ================== VOTE CARD ================== */
.card {
    background: radial-gradient(circle at top left, rgba(59,130,246,0.24), transparent), #020617;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 24px 60px rgba(0,0,0,0.9);
    padding: 20px 18px 18px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at top left, var(--accent-soft), transparent 60%);
    opacity: 0.9;
    pointer-events: none;
}

.card-inner { position: relative; z-index: 1; }

.title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.title-main { font-size: 1.15rem; font-weight: 600; letter-spacing: 0.03em; }

.title-row1 { display: flex; align-items: left; padding-bottom: 14px; gap: 12px; }
.title-main1 { font-size: 1.65rem; font-weight: 700; letter-spacing: 0.03em; vertical-align: middle; margin-top: 10px; }
.title-sub { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.15em; }

@media (min-width: 600px) {
    .card { padding: 22px 22px 20px; }
    .title-main { font-size: 1.25rem; }
}

/* ================== FORM ================== */
label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

select,
input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 10px 11px;
    border-radius: 10px;
    border: 1px solid #1f2937;
    background: rgba(15,23,42,0.92);
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    -webkit-appearance: none;
}

::placeholder { color: #9ca3af; opacity: 1; }
select option[value=""] { color: #9ca3af; }
select:not(:valid) { color: #9ca3af; }

select:focus,
input[type="text"]:focus,
input[type="email"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-soft);
    background: rgba(15,23,42,1);
}

/* Autofill override */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text-main) !important;
    caret-color: var(--text-main);
    box-shadow: 0 0 0px 1000px rgba(15,23,42,0.92) inset !important;
    border: 1px solid #1f2937 !important;
    transition: background-color 5000s ease-in-out 0s;
}

.form-group { position: relative; margin-bottom: 8px; }

.field-valid-icon,
.field-invalid-icon {
    position: absolute;
    right: 12px; top: 12px;
    font-size: 18px;
    display: none;
    pointer-events: none;
}

.field-valid-icon { color: #22c55e; }
.field-invalid-icon { color: #f97373; }
.form-group.valid .field-valid-icon { display: block; }
.form-group.invalid .field-invalid-icon { display: block; }

.vote-fieldset {
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 20px;
}

.vote-fieldset legend { font-weight: 600; font-size: 0.95rem; color: #7cc9ff; padding: 0 10px; }

.vote-inline label { font-size: 0.9rem; color: var(--text-muted); margin-right: 6px; }

.error-msg { color: var(--error); font-size: 0.9rem; margin-top: 6px; display: none; }

.error-box,
.success-box { font-size: 0.8rem; border-radius: 10px; padding: 8px 10px; margin-top: 8px; }

.success-box {
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.6);
    color: var(--success);
}

.confirmation { text-align: center; }
.confirmation h2 { font-size: 1.1rem; margin-bottom: 6px; }
.confirmation p { font-size: 0.9rem; color: var(--text-muted); }

/* ================== TD TRAITS ================== */
.td-traits {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 600px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 600px) {
    .td-traits { grid-template-columns: 1fr 1fr; }
}

.td-traits li {
    display: flex;
    align-items: flex-start;
    background: rgba(255,255,255,0.05);
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.07);
    text-align: left;
}

.trait-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: white;
    font-size: 16px;
    margin-right: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

.trait-content { flex: 1; }

.trait-label { font-weight: 700; font-size: 1.2rem; display: block; margin-bottom: 4px; color: #7cc9ff; }
.trait-desc { font-size: 0.9rem; line-height: 1.4; color: #dce4f1; }

/* ================== CAROUSEL (mobile only) ================== */
@media (max-width: 599px) {
    .traits-carousel-wrapper { position: relative; padding: 0; overflow: hidden; }

    .td-traits {
        display: flex;
        overflow-x: scroll;
        scroll-snap-type: x proximity;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 16px;
        padding-left: calc(50vw - (100vw - 128px) / 2);
        padding-right: calc(50vw - (100vw - 128px) / 2);
    }

    .td-traits::-webkit-scrollbar { display: none; }

    .td-traits li {
        width: calc(100vw - 128px);
        min-width: calc(100vw - 128px);
        max-width: calc(100vw - 128px);
        scroll-snap-align: center;
        flex-shrink: 0;
        margin-right: 0;
    }

    .carousel-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 20px;
    }

    .carousel-dot {
        width: 8px; height: 8px;
        border-radius: 50%;
        background: rgba(255,255,255,0.3);
        transition: background 0.3s;
    }

    .carousel-dot.active { background: #fff; }
}

@media (min-width: 600px) {
    .carousel-arrow,
    .carousel-dots { display: none; }
    .traits-carousel-wrapper { padding: 0; }
}

/* ================== TERMS MODAL ================== */
#termsModal.terms-overlay {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 999;
}

#termsModal.terms-overlay.open { display: block; }

#termsModal .terms-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.85);
    backdrop-filter: blur(4px);
}

.terms-card {
    position: relative;
    max-width: 500px;
    margin: 60px auto;
    padding: 0;
    z-index: 1001;
}

.terms-window {
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow: visible;
    border-radius: 16px;
    background: radial-gradient(circle at top left, rgba(59,130,246,0.24), #020617);
    border: 2px solid #3b82f6;
    position: relative;
    padding: 20px 18px 18px;
}

.terms-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 20px;
    padding-bottom: 20px;
    box-sizing: border-box;
}

.modal-close {
    position: absolute;
    top: 10px; right: 10px;
    width: 28px; height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(148,163,184,0.5);
    background: rgba(15,23,42,0.95);
    color: #e5e7eb;
    font-size: 18px;
    line-height: 24px;
    cursor: pointer;
    z-index: 99999;
}

.terms-window h2 { margin-top: 0; font-size: 1.3rem; margin-bottom: 12px; }
.terms-content h3 { margin-top: 18px; font-size: 1.05rem; color: #7fb6ff; }

/* ================== FOOTER ================== */
.site-footer {
    font-size: 10px;
    color: #6b7c9c;
    text-align: center;
    padding-bottom: 20px;
    opacity: 0.65;
    letter-spacing: 0.4px;
}

/* ================== HALL OF FAME ================== */
.hof-section {
    padding: 24px 16px 28px;
    max-width: 620px;
    margin: 0 auto;
    box-sizing: border-box;
}

.hof-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 600px) {
    .hof-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

.hof-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
    overflow: hidden;
}

.hof-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 8px;
    display: block;
}

.hof-tbd .hof-img { opacity: 0.25; filter: grayscale(1); }

.hof-month { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #94a3b8; }
.hof-name { font-size: 0.9rem; font-weight: 700; color: #e2e8f0; margin-top: 2px; }
.hof-tbd .hof-month,
.hof-tbd .hof-name { color: #475569; }