/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    touch-action: manipulation;
}

/* ── Czcionki TeleNeo ───────────────────────────────────────── */
@font-face {
    font-family:"TeleNeo";
    src:url("fonts/TeleNeo-Regular.otf") format("opentype");
    font-weight:400;
}
@font-face {
    font-family:"TeleNeo";
    src:url("fonts/TeleNeo-Bold.otf") format("opentype");
    font-weight:700;
}
@font-face {
    font-family:"TeleNeo";
    src:url("fonts/TeleNeo-ExtraBold.otf") format("opentype");
    font-weight:800;
}
@font-face {
    font-family:"TeleNeo";
    src:url("fonts/TeleNeo-Medium.otf") format("opentype");
    font-weight:500;
}

body {
    font-family: "TeleNeo", "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* ── Orientacja ─────────────────────────────────────────────── */
#orientation-warning {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-align: center;
    padding: 20px;
}

/* ── Tło gradient ───────────────────────────────────────────── */
.background {
    min-height: 100dvh;
    width: 100%;
    background: linear-gradient(to right, #000000, #ae005d);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* ── Ticket wrapper ─────────────────────────────────────────── */
.ticket {
    width: min(90vw, calc(100dvh * 0.64));
    max-width: 480px;
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ── SVG warstwy ────────────────────────────────────────────── */
.ticket__top,
.ticket__bottom {
    position: relative;
    width: 100%;
    height: 15dvh; /* zamiast padding-top */
    flex-shrink: 0;
}
.ticket__top    {
    padding-top: 31.41%;
}   /* 360.52/1147.86 */
.ticket__bottom {
    padding-top: 46.95%;
}   /* 538.87/1147.86 */

.ticket__top img,
.ticket__bottom img,
.ticket__main img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill;
}

.ticket__top-content {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 90%;
    margin: 0 auto;
    left: 10%;
    right: 5%;
    padding: 27% 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ticket__bottom-content {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 22%;
}

/* ── MAIN ───────────────────────────────────────────────────── */
.ticket__main {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
}

.ticket__main-content {
    position: relative;
    z-index: 1;
    height: 100%;
    overflow-y: auto;
    width: 80%;
    margin: 0 auto;
    padding: 20px 0 24px;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ticket__main-content::-webkit-scrollbar {
    display: none;
}

/* ── TOP labels ─────────────────────────────────────────────── */
.ticket__category {
    color: rgba(255,255,255,0.8);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.ticket__title {
    color: #fff;
    font-size: clamp(13px, 3.5vw, 20px);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.15;
}

/* ── Ekrany ─────────────────────────────────────────────────── */
.screen {
    display: none;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}
.screen.visible {
    display: flex;
}

/* ── START ──────────────────────────────────────────────────── */
.screen-intro-text {
    color: #fff;
    font-size: clamp(14px, 3.5vw, 18px);
    font-weight: 700;
    line-height: 1.5;
}
.screen-intro-sub {
    color: rgba(255,255,255,0.85);
    font-size: clamp(12px, 3vw, 15px);
    line-height: 1.5;
}
.start-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

/* ── FORM ───────────────────────────────────────────────────── */
.screen-label {
    color: #fff;
    font-size: clamp(13px, 3.2vw, 16px);
    font-weight: 700;
    line-height: 1.4;
}
.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 999px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.form-input::placeholder {
    color: rgba(255,255,255,0.55);
}
.form-input:focus {
    border-color: #fff;
}

.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: none;
}
.form-textarea::placeholder {
    color: rgba(255,255,255,0.55);
}
.form-textarea:focus {
    border-color: #fff;
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn-primary {
    background: #fff;
    color: #c8005a;
    border: none;
    border-radius: 999px;
    padding: 13px 32px;
    font-size: clamp(13px, 3.5vw, 16px);
    font-weight: 900;
    letter-spacing: 0.06em;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.1s, opacity 0.1s;
    text-align: center;
}
.btn-primary:hover  {
    opacity: 0.9;
}
.btn-primary:active {
    transform: scale(0.97);
}

.btn-secondary {
    display: block;
    text-align: center;
    color: #c8005a;
    background: #fff;
    font-size: clamp(13px, 3.5vw, 16px);
    font-weight: 900;
    letter-spacing: 0.06em;
    text-decoration: none;
    padding: 13px 32px;
    border-radius: 999px;
    cursor: pointer;
}

.btn-secondary-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 999px;
    padding: 12px 24px;
    font-size: clamp(12px, 3vw, 14px);
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s;
}
.btn-secondary-outline:hover {
    border-color: #fff;
}

/* ── PLAYER INTRO ───────────────────────────────────────────── */
.screen-player-intro {
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}
.intro-sub  {
    color: rgba(255,255,255,0.8);
    font-size: clamp(14px,3.5vw,18px);
}
.intro-name {
    color: #fff;
    font-size: clamp(24px,6vw,36px);
    font-weight: 800;
}
.intro-tap  {
    color: rgba(255,255,255,0.6);
    font-size: clamp(11px,2.8vw,14px);
    margin-top: 16px;
}

/* ── QUIZ ───────────────────────────────────────────────────── */
.quiz-header {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.quiz-cat-label {
    color: rgba(255,255,255,0.75);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.quiz-cat-name {
    color: #fff;
    font-size: clamp(14px,3.8vw,18px);
    font-weight: 800;
    text-transform: uppercase;
}

.quiz-progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.quiz-progress-track {
    height: 4px;
    background: rgba(255,255,255,0.25);
    border-radius: 99px;
    overflow: hidden;
}
.quiz-progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 99px;
    transition: width 0.3s ease;
}
.quiz-progress-text {
    color: rgba(255,255,255,0.7);
    font-size: 11px;
}

.quiz-question-wrap {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.quiz-q-number {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    flex-shrink: 0;
    padding-top: 1px;
}
.quiz-question  {
    color: #fff;
    font-size: clamp(13px,3.3vw,16px);
    font-weight: 700;
    line-height: 1.45;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.option {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid rgba(255,255,255,0.7);
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.option:hover  {
    background: rgba(255,255,255,0.15);
}
.option.active {
    background: rgba(255,255,255,0.3);
    border-color: #fff;
}

.option-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.option.active .option-circle {
    background: #fff;
    color: #e20074;
    border-color: #fff;
}
.option-text {
    color: #fff;
    font-size: clamp(12px,3vw,14px);
    font-weight: 500;
}

/* ── CREATIVE ───────────────────────────────────────────────── */
.creative-title  {
    font-size: clamp(15px,4vw,18px) !important;
}
.creative-question {
    color: #fff;
    font-size: clamp(13px,3.3vw,15px);
    font-weight: 700;
    line-height: 1.5;
}
.creative-sub {
    font-weight: 400;
    font-size: 0.9em;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(255,255,255,0.85);
    font-size: clamp(11px,2.8vw,13px);
    cursor: pointer;
    line-height: 1.4;
}
.checkbox-label input {
    display: none;
}
.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-radius: 3px;
    flex-shrink: 0;
    margin-top: 1px;
    transition: background 0.15s;
}
.checkbox-label input:checked + .custom-checkbox {
    background: #fff;
}

/* ── CONFIRM ────────────────────────────────────────────────── */
.confirm-sub {
    color: rgba(255,255,255,0.8);
    font-size: clamp(12px,3vw,14px);
    line-height: 1.5;
}

/* ── WYNIK ──────────────────────────────────────────────────── */
.result-names {
    color: rgba(255,255,255,0.85);
    font-size: clamp(13px,3.3vw,16px);
    font-weight: 700;
    text-align: center;
}
.result-percent-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 8px 0;
}
.result-percent {
    color: #fff;
    font-size: clamp(48px,14vw,80px);
    font-weight: 800;
    line-height: 1;
}
.result-percent-label {
    color: rgba(255,255,255,0.75);
    font-size: clamp(13px,3.3vw,16px);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.result-label {
    color: #fff;
    font-size: clamp(13px,3.3vw,15px);
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}
.result-outro {
    color: rgba(255,255,255,0.65);
    font-size: clamp(12px,3vw,14px);
    text-align: center;
    font-style: italic;
}


.start-links a {
    display: block;
    position: static;
    flex-shrink: 0;
}

.ticket__top > img,
.ticket__bottom > img,
.ticket__main > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill;
}

.start-links a img {
    position: static !important;
    width: 100%;
    display: block;
}
/* ── OVERLAY ────────────────────────────────────────────────── */
#quiz-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.75);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.overlay-box {
    background: #c8005a;
    border-radius: 16px;
    padding: 28px 24px;
    max-width: 320px;
    width: 100%;
    display: flex; flex-direction: column; gap: 20px;
}
.overlay-msg {
    color: #fff;
    font-size: clamp(14px, 3.5vw, 16px);
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}
.overlay-btns {
    display: flex; flex-direction: column; gap: 10px;
}
.overlay-confirm {
    background: #fff; color: #c8005a;
    border: none; border-radius: 999px;
    padding: 12px 24px;
    font-size: clamp(13px, 3.5vw, 15px);
    font-weight: 900; cursor: pointer; font-family: inherit;
}
.overlay-cancel {
    background: transparent; color: #fff;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 999px;
    padding: 11px 24px;
    font-size: clamp(13px, 3.5vw, 15px);
    font-weight: 700; cursor: pointer; font-family: inherit;
}
