@font-face {
    font-family: 'BreathingIQOS';
    src: url('font/BreathingIQOSRegular2.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --orange:  #E3813B;
    --teal:    #01D2D4;
    --bg:      #F6F4F0;
    --dark:    #34303D;
    --white:   #ffffff;
    --gray:    #C8C5C0;
    --radius:  16px;
}

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

html, body {
    height: 100%;
    overflow: hidden;
    background: url('images/tlo.png') no-repeat center center / cover;
    background-attachment: fixed;
    color: var(--dark);
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.page {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

main {
    flex: 1;
    overflow-y: auto;
    padding: 20px 20px 24px;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

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

/* ── Email form screen ── */
.form-screen {
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 28px;
}

.label-adres {
    font-family: 'BreathingIQOS', cursive;
    font-size: 72px;
    color: #ffffff;
    line-height: 1;
    text-align: center;
    margin-bottom: 2px;
}

.label-email {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #ffffff;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.input-purple {
    width: 100%;
    background: #2E008B;
    border: none;
    border-radius: 30px;
    padding: 16px 24px;
    font-size: 16px;
    color: #ffffff;
    outline: none;
    text-align: center;
    margin-bottom: 20px;
    -webkit-appearance: none;
}

.input-purple::placeholder { color: rgba(255,255,255,.4); }
.input-purple:focus { box-shadow: 0 0 0 2px rgba(255,255,255,.3); }

.input-purple:-webkit-autofill,
.input-purple:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #2E008B inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
}

/* ── Checkbox ── */
.checkbox-wrap {
    width: 100%;
    margin-bottom: 22px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] { display: none; }

.checkbox-custom {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255,255,255,.6);
    border-radius: 6px;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s;
}

.checkbox-label input:checked + .checkbox-custom {
    background: #2E008B;
    border-color: #ffffff;
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '✓';
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.checkbox-text {
    font-size: 13px;
    color: rgba(255,255,255,.85);
    line-height: 1.5;
}

.link-reg {
    color: #ffffff;
    text-decoration: underline;
}

/* ── Main button ── */
.btn-main {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 30px;
    background: #446BE4;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
}

.btn-main:active  { transform: scale(.98); }
.btn-main:disabled { opacity: .55; cursor: not-allowed; }

/* ── Inline alert ── */
.alert-inline {
    display: none;
    width: 100%;
    background: rgba(0,0,0,.35);
    color: #ffffff;
    font-size: 13px;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    text-align: center;
}

/* ── Cards ── */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px 20px;
    box-shadow: 0 4px 20px rgba(52,48,61,.08);
    margin-bottom: 16px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.card-sub {
    font-size: 14px;
    color: #7a7580;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ── Badge ── */
.qr-badge {
    display: inline-block;
    background: var(--teal);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}

/* ── Form ── */
.form-group { margin-bottom: 16px; }

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
    letter-spacing: .3px;
}

input[type="email"]:not(.input-purple) {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E0DDD8;
    border-radius: 10px;
    font-size: 16px;
    color: var(--dark);
    background: var(--bg);
    outline: none;
    transition: border-color .2s;
    -webkit-appearance: none;
}

input[type="email"]:focus { border-color: var(--teal); }

/* ── Buttons ── */
.btn {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: opacity .2s, transform .1s;
    letter-spacing: .3px;
}

.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary {
    background: var(--orange);
    color: var(--white);
}

.btn-teal {
    background: var(--teal);
    color: var(--white);
    margin-top: 12px;
    text-decoration: none;
    display: block;
    line-height: 1;
    padding: 16px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
}

/* ── Toast / overlay ── */
.toast {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(52,48,61,.85);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.toast.show { display: flex; }

.toast-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    max-width: 340px;
    width: 100%;
    animation: popIn .3s ease;
}

@keyframes popIn {
    from { transform: scale(.85); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.toast-icon {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 16px;
}

.toast-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 10px;
}

.toast-text {
    font-size: 15px;
    color: #5a5560;
    line-height: 1.6;
}

.toast-pts {
    display: inline-block;
    background: var(--orange);
    color: var(--white);
    font-size: 22px;
    font-weight: 800;
    padding: 8px 22px;
    border-radius: 30px;
    margin-top: 16px;
}

/* ── Summary circles ── */
.points-total {
    text-align: center;
    padding: 10px 0 8px;
}

.points-number {
    font-size: 64px;
    font-weight: 900;
    color: var(--orange);
    line-height: 1;
}

.points-label {
    font-size: 14px;
    color: #7a7580;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.circles-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.circle {
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    transition: transform .2s;
    position: relative;
}

.circle.done {
    background: linear-gradient(135deg, var(--orange), #f0a060);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(227,129,59,.35);
}

.circle.pending {
    background: #E8E5E0;
    color: var(--gray);
}

.circle .check {
    font-size: 22px;
    line-height: 1;
}

.circle .num {
    font-size: 11px;
    font-weight: 600;
    opacity: .7;
    margin-top: 1px;
}

/* ── Reward screen ── */
.reward-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 0 28px;
    gap: 16px;
}

.reward-time {
    font-size: 64px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 4px;
    line-height: 1;
    animation: fadeDown .6s ease both;
}

.reward-svg {
    animation: popIn .5s .2s ease both;
}

.reward-svg img {
    width: 52vw;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(255,255,255,.3));
}

.reward-label {
    font-family: 'BreathingIQOS', cursive;
    font-size: 52px;
    color: #ffffff;
    line-height: 1;
    animation: fadeUp .6s .4s ease both;
}

.reward-sublabel {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,.75);
    letter-spacing: 1px;
    animation: fadeUp .6s .5s ease both;
}

.reward-msg {
    font-size: 13px;
    color: rgba(255,255,255,.6);
    margin-top: 4px;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Already done alert ── */
.alert {
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    display: none;
}

.alert-warn { background: #fff3e0; color: #e65100; border-left: 4px solid var(--orange); }
.alert-err  { background: #fce4e4; color: #c62828; border-left: 4px solid #e53935; }

/* ── Error page ── */
.error-wrap {
    text-align: center;
    padding: 60px 20px;
}

.error-wrap .error-icon { font-size: 64px; margin-bottom: 20px; }
.error-wrap h2 { font-size: 22px; color: var(--dark); margin-bottom: 10px; }
.error-wrap p  { color: #7a7580; line-height: 1.6; }

/* ── Footer ── */
footer {
    flex-shrink: 0;
    height: 0;
}
