/* =========================================================
   YOURLS ULTIMATE AD REDIRECT
   Fullscreen fundraising redirect
   Inter Regular
   Mobile: photo visible + timer and CTA on same row
   ========================================================= */


/* =========================
   RESET
   ========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;

    width: 100%;
    min-height: 100%;
}

html {
    background: #111;
}


/* =========================
   FONT
   ========================= */

body,
button,
input,
select,
textarea,
a {
    font-family: "Inter", sans-serif;
    font-weight: 400;
}


/* =========================
   BODY
   ========================= */

body {
    width: 100%;

    min-height: 100vh;
    min-height: 100svh;

    color: #ffffff;

    background-image:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.22) 0%,
            rgba(0, 0, 0, 0.06) 42%,
            rgba(0, 0, 0, 0.01) 100%
        ),
        var(--redirect-background);

    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;

    overflow-x: hidden;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* =========================
   WRAPPER
   ========================= */

.redirect-wrapper {
    width: 100%;

    min-height: 100vh;
    min-height: 100svh;

    display: flex;

    align-items: center;
    justify-content: flex-start;

    padding: 28px 4vw;
}


/* =========================
   CARD
   ========================= */

.redirect-card {
    width: 100%;
    max-width: 330px;

    padding: 20px;

    color: #111827;

    background:
        rgba(
            255,
            255,
            255,
            0.965
        );

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            0.60
        );

    border-radius: 18px;

    box-shadow:
        0 20px 60px
        rgba(
            0,
            0,
            0,
            0.28
        );

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    animation:
        cardEnter
        0.45s
        ease-out;
}


@keyframes cardEnter {

    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================
   HEADER
   ========================= */

.redirect-header {
    margin-bottom: 15px;
}


/* =========================
   TOP META
   ========================= */

.top-meta {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 9px;

    margin-bottom: 15px;
}


/* =========================
   LINK SICURO
   ========================= */

.service-label {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 5px;

    flex-shrink: 0;

    padding: 6px 9px;

    background: #111827;

    color: #ffffff;

    border-radius: 999px;

    font-size: 9.5px;
    font-weight: 400;

    line-height: 1;

    letter-spacing: 0.08em;

    text-transform: uppercase;

    white-space: nowrap;
}


.service-icon {
    width: 10px;
    height: 10px;

    flex: 0 0 10px;
}


/* =========================
   SPONSOR
   ========================= */

.sponsor-text {
    display: flex;

    flex-direction: column;

    align-items: flex-end;

    min-width: 0;

    color: #9ca3af;

    font-size: 9.5px;

    line-height: 1.1;

    text-align: right;
}


.sponsor-text strong {
    display: block;

    max-width: 140px;

    margin-top: 2px;

    overflow: hidden;

    color: #374151;

    font-size: 10.5px;
    font-weight: 400;

    line-height: 1.15;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================
   MAIN MESSAGE
   ========================= */

.redirect-header h1 {
    margin: 0;

    color: #111827;

    font-size: 21px;
    font-weight: 400;

    line-height: 1.12;

    letter-spacing: -0.025em;
}


/* =========================
   SUBTITLE
   ========================= */

.subtitle {
    margin: 9px 0 0;

    color: #6b7280;

    font-size: 12.5px;

    line-height: 1.45;
}


.subtitle-secondary {
    display: block;

    margin-top: 6px;

    color: #9ca3af;
}


/* =========================
   BRAND BOX
   ========================= */

.brand-box {
    position: relative;

    width: 100%;

    margin: 15px 0 16px;

    padding: 22px 12px 10px;

    background: #f8f9fb;

    border: 1px solid #e5e7eb;

    border-radius: 11px;
}


.brand-label {
    position: absolute;

    top: 7px;
    left: 11px;

    color: #9ca3af;

    font-size: 9px;

    letter-spacing: 0.09em;

    text-transform: uppercase;
}


.brand-logo-container {
    width: 100%;

    min-height: 82px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 9px 5px;
}


.brand-logo {
    display: block;

    width: auto;
    height: auto;

    max-width: 270px;
    max-height: 76px;

    object-fit: contain;
}


/* =========================
   TIMER + CTA WRAPPER
   ========================= */

.timer-action-row {
    width: 100%;
}


/* =========================
   TIMER
   ========================= */

.timer-section {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 14px;

    padding: 3px 0 11px;
}


.timer-group {
    flex: 0 0 auto;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;
}


.timer-circle {
    position: relative;

    width: 76px;
    height: 76px;
}


.progress-ring {
    position: absolute;

    inset: 0;

    width: 76px;
    height: 76px;

    transform: rotate(-90deg);
}


.progress-ring-background,
.progress-ring-progress {
    fill: none;

    stroke-width: 5;
}


.progress-ring-background {
    stroke: #e4e7ec;
}


.progress-ring-progress {
    stroke: #111827;

    stroke-linecap: round;

    transition:
        stroke-dashoffset 0.7s linear,
        stroke 0.25s ease;
}


.timer-content {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    pointer-events: none;
}


.countdown {
    color: #111827;

    font-size: 29px;

    line-height: 1;

    letter-spacing: -0.025em;
}


.timer-label {
    display: block;

    margin-top: 5px;

    color: #8b95a5;

    font-size: 9px;

    line-height: 1;

    letter-spacing: 0.075em;

    text-transform: uppercase;
}


.timer-message {
    flex: 1;

    min-width: 0;
}


.status-text {
    margin: 0;

    color: #4b5563;

    font-size: 12.5px;

    line-height: 1.35;
}


.skip-hint {
    display: block;

    margin-top: 4px;

    color: #9ca3af;

    font-size: 10.5px;

    line-height: 1.3;
}


/* =========================
   ACTION
   ========================= */

.timer-action-row .action-area {
    margin-top: 14px;
}


.continue-button {
    width: 100%;

    min-height: 43px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 11px 17px;

    background: #111827;

    color: #ffffff;

    border-radius: 10px;

    font-size: 14px;

    line-height: 1.2;

    text-decoration: none;

    cursor: pointer;

    box-shadow:
        0 8px 22px
        rgba(
            17,
            24,
            39,
            0.18
        );

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}


.continue-button:hover {
    background: #000;

    transform: translateY(-1px);

    box-shadow:
        0 11px 26px
        rgba(
            17,
            24,
            39,
            0.25
        );
}


.continue-button:active {
    transform: translateY(0);
}


.button-arrow {
    width: 14px;
    height: 14px;

    flex: 0 0 14px;
}


/* =========================
   DESTINATION
   ========================= */

.destination-box {
    width: 100%;

    margin-top: 13px;

    padding: 10px 11px;

    background:
        rgba(
            243,
            244,
            246,
            0.92
        );

    border-radius: 9px;
}


.destination-label {
    display: block;

    margin-bottom: 3px;

    color: #9ca3af;

    font-size: 9px;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}


.destination-url {
    color: #374151;

    font-size: 12px;

    line-height: 1.35;

    overflow-wrap: anywhere;
}


/* =========================
   INFO
   ========================= */

.redirect-info {
    margin: 7px 0 0;

    color: #9ca3af;

    font-size: 10px;

    line-height: 1.35;
}


/* =========================
   FOOTER
   ========================= */

.redirect-footer {
    margin-top: 13px;

    padding-top: 11px;

    border-top:
        1px solid
        #eceff3;
}


/* =========================
   SECURITY
   ========================= */

.security-badges {
    width: 100%;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 5px;
}


.security-item {
    flex: 1 1 0;

    min-width: 0;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 3px;

    color: #89929f;

    font-size: 8.5px;

    line-height: 1.15;

    text-align: center;
}


.security-icon {
    width: 10px;
    height: 10px;

    flex: 0 0 10px;

    color: #6b7280;
}


/* =========================
   READY
   ========================= */

body.redirect-ready
.progress-ring-progress {
    stroke: #16a34a;
}


body.redirect-ready
.status-text {
    color: #15803d;
}


/* =========================================================
   MOBILE
   FOTO BEN VISIBILE + TIMER E CTA STESSA RIGA
   ========================================================= */

@media (max-width: 700px) {

    body {
        min-height: 100svh;

        background-attachment: scroll;

        background-position: center 20%;
    }


    .redirect-wrapper {
        width: 100%;

        min-height: 100svh;

        display: flex;

        align-items: flex-end;
        justify-content: center;

        padding:
            38svh
            10px
            10px;
    }


    .redirect-card {
        width: 100%;

        max-width: none;

        padding:
            15px
            17px
            14px;

        border-radius:
            18px
            18px
            12px
            12px;

        background:
            rgba(
                255,
                255,
                255,
                0.97
            );

        box-shadow:
            0
            -10px
            35px
            rgba(
                0,
                0,
                0,
                0.18
            );

        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }


    /* =========================
       HEADER COMPACT
       ========================= */

    .redirect-header {
        margin-bottom: 9px;
    }


    .top-meta {
        margin-bottom: 9px;
    }


    .redirect-header h1 {
        font-size: 21px;

        line-height: 1.08;
    }


    .subtitle {
        margin-top: 6px;

        font-size: 12px;

        line-height: 1.32;
    }


    .subtitle-secondary {
        margin-top: 3px;
    }


    /* =========================
       BRAND COMPACT
       ========================= */

    .brand-box {
        margin:
            9px
            0
            10px;

        padding:
            19px
            9px
            6px;
    }


    .brand-logo-container {
        min-height: 54px;

        padding:
            4px
            3px;
    }


    .brand-logo {
        max-width: 230px;

        max-height: 54px;
    }


    /* =========================
       TIMER + CTA SAME ROW
       ========================= */

    .timer-action-row {
        display: grid;

        grid-template-columns:
            minmax(0, 1fr)
            minmax(128px, 0.85fr);

        align-items: center;

        gap: 9px;

        width: 100%;
    }


    .timer-section {
        width: auto;

        min-width: 0;

        display: flex;

        align-items: center;

        gap: 7px;

        padding: 0;
    }


    .timer-group {
        flex: 0 0 auto;
    }


    .timer-circle {
        width: 54px;
        height: 54px;
    }


    .progress-ring {
        width: 54px;
        height: 54px;
    }


    .countdown {
        font-size: 22px;
    }


    .timer-label {
        margin-top: 3px;

        font-size: 8px;
    }


    .timer-message {
        min-width: 0;
    }


    .status-text {
        font-size: 10px;

        line-height: 1.22;
    }


    .skip-hint {
        display: none;
    }


    /* CTA on same row */

    .timer-action-row .action-area {
        margin: 0;

        min-width: 0;
    }


    .continue-button {
        width: 100%;

        min-height: 40px;

        padding:
            9px
            9px;

        gap: 5px;

        border-radius: 9px;

        font-size: 12px;

        text-align: center;
    }


    .button-arrow {
        width: 12px;
        height: 12px;

        flex: 0 0 12px;
    }


    /* =========================
       DESTINATION
       ========================= */

    .destination-box {
        margin-top: 9px;

        padding:
            7px
            9px;
    }


    .destination-label {
        font-size: 8px;
    }


    .destination-url {
        font-size: 11px;
    }


    /* =========================
       INFO
       ========================= */

    .redirect-info {
        margin-top: 5px;

        font-size: 8.5px;

        line-height: 1.25;
    }


    /* =========================
       SECURITY
       ========================= */

    .redirect-footer {
        margin-top: 8px;

        padding-top: 8px;
    }


    .security-item {
        font-size: 7.5px;
    }


    .security-icon {
        width: 9px;
        height: 9px;

        flex: 0 0 9px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 390px) {

    body {
        background-position: center 17%;
    }


    .redirect-wrapper {
        padding:
            40svh
            8px
            8px;
    }


    .redirect-card {
        padding:
            14px
            13px
            12px;

        border-radius:
            16px
            16px
            10px
            10px;
    }


    .top-meta {
        gap: 6px;

        margin-bottom: 7px;
    }


    .service-label {
        padding:
            5px
            7px;

        font-size: 8.5px;
    }


    .sponsor-text {
        font-size: 8.5px;
    }


    .sponsor-text strong {
        max-width: 105px;

        font-size: 9.5px;
    }


    .redirect-header h1 {
        font-size: 21px;
    }


    .subtitle {
        font-size: 11.5px;
    }


    .brand-box {
        margin:
            8px
            0
            9px;
    }


    .brand-logo-container {
        min-height: 48px;
    }


    .brand-logo {
        max-width: 205px;

        max-height: 48px;
    }


    .timer-action-row {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(112px, 0.8fr);

        gap: 6px;
    }


    .timer-section {
        gap: 5px;
    }


    .timer-circle {
        width: 48px;
        height: 48px;
    }


    .progress-ring {
        width: 48px;
        height: 48px;
    }


    .countdown {
        font-size: 20px;
    }


    .timer-label {
        font-size: 7.5px;
    }


    .status-text {
        font-size: 9.5px;
    }


    .continue-button {
        min-height: 37px;

        padding:
            7px
            7px;

        font-size: 11px;
    }


    .button-arrow {
        width: 10px;
        height: 10px;

        flex: 0 0 10px;
    }


    .destination-box {
        margin-top: 7px;
    }


    .destination-url {
        font-size: 10.5px;
    }


    .redirect-info {
        font-size: 8px;
    }


    .security-badges {
        gap: 3px;
    }


    .security-item {
        font-size: 7px;
    }

}


/* =========================
   REDUCED MOTION
   ========================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;

        transition-duration: 0.01ms !important;
    }

}