:root {
    --orange: #ee812c;
    --orange-dark: #d96f20;
    --orange-soft: #fff3e8;

    --navy: #07111f;
    --navy-2: #0f172a;

    --text: #172033;
    --muted: #64748b;
    --line: #e7ebf0;

    --white: #ffffff;
    --bg: #f6f8fb;

    --success: #16a34a;
    --danger: #dc2626;

    --shadow:
        0 25px 70px rgba(15, 23, 42, .10);

    --radius: 22px;
}


/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    min-height: 100vh;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(238, 129, 44, .12),
            transparent 32%
        ),
        radial-gradient(
            circle at 90% 15%,
            rgba(7, 17, 31, .08),
            transparent 30%
        ),
        var(--bg);
}


/* =========================================================
   PAGE
========================================================= */

.don-page {
    min-height: 100vh;

    padding:
        24px
        20px
        35px;
}

.don-shell {
    width: min(
        1050px,
        100%
    );

    margin: 0 auto;
}


/* =========================================================
   HEADER
========================================================= */

.don-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}

.don-logo {
    display: inline-flex;

    align-items: center;

    text-decoration: none;

    font-size: 25px;

    font-weight: 800;

    letter-spacing: -.8px;
}

.logo-main {
    color: var(--navy);
}

.logo-domain {
    color: var(--orange);
}

.back-button {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 9px 13px;

    border:
        1px solid
        var(--line);

    border-radius: 10px;

    background: var(--white);

    color: var(--muted);

    text-decoration: none;

    font-size: 13px;

    font-weight: 600;

    transition:
        .2s ease;
}

.back-button:hover {
    color: var(--orange);

    border-color:
        rgba(238,129,44,.35);

    transform:
        translateY(-1px);
}


/* =========================================================
   MAIN CARD
========================================================= */

.don-card {
    position: relative;

    overflow: hidden;

    background:
        rgba(255,255,255,.96);

    border:
        1px solid
        var(--line);

    border-radius:
        var(--radius);

    padding:
        clamp(22px, 5vw, 46px);

    box-shadow:
        var(--shadow);
}

.don-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 4px;

    background:
        linear-gradient(
            90deg,
            var(--orange),
            #ffad70
        );
}


/* =========================================================
   TITLE
========================================================= */

.download-badge {
    display: inline-flex;

    align-items: center;

    gap: 9px;

    padding:
        7px 11px;

    border-radius: 999px;

    background:
        var(--orange-soft);

    color:
        var(--orange);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: .08em;
}

.badge-icon {
    width: 23px;
    height: 23px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        var(--orange);

    color: white;

    font-size: 12px;
}

.don-title {
    margin:
        18px
        0
        28px;
}

.don-title h1 {
    margin: 0 0 9px;

    max-width: 720px;

    color:
        var(--navy);

    font-size:
        clamp(
            28px,
            5vw,
            44px
        );

    line-height: 1.08;

    letter-spacing: -1.5px;

    font-weight: 800;
}

.don-title p {
    margin: 0;

    max-width: 680px;

    color: var(--muted);

    font-size: 15px;

    line-height: 1.7;
}


/* =========================================================
   BOOK PREVIEW
========================================================= */

.book-preview {
    display: flex;

    align-items: center;

    gap: 22px;

    padding: 18px;

    border:
        1px solid
        var(--line);

    border-radius: 17px;

    background:
        #fbfcfe;

    margin-bottom: 20px;
}

.book-cover {
    flex:
        0 0 100px;

    width: 100px;
    height: 136px;

    overflow: hidden;

    border-radius: 10px;

    background:
        #edf1f5;

    box-shadow:
        0 12px 25px
        rgba(15,23,42,.13);
}

.book-cover img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.book-information {
    min-width: 0;
}

.book-label {
    display: block;

    margin-bottom: 7px;

    color:
        var(--orange);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: .08em;
}

.book-information h2 {
    margin: 0 0 6px;

    color:
        var(--navy);

    font-size:
        clamp(
            18px,
            3vw,
            24px
        );

    line-height: 1.25;

    font-weight: 750;
}

.book-subtitle {
    margin: 0 0 10px;

    color:
        var(--muted);

    font-size: 13px;

    line-height: 1.55;
}

.book-author {
    display: flex;

    align-items: center;

    gap: 7px;

    color:
        #475569;

    font-size: 13px;

    font-weight: 600;
}

.book-author i {
    color:
        var(--orange);
}

.book-details {
    display: flex;

    flex-wrap: wrap;

    gap: 15px;

    margin-top: 12px;

    color:
        #64748b;

    font-size: 12px;
}

.book-details span {
    display: inline-flex;

    align-items: center;

    gap: 6px;
}

.book-details i {
    color:
        var(--orange);
}


/* =========================================================
   ACCESS PANEL
========================================================= */

.access-panel {
    display: flex;

    gap: 22px;

    padding:
        24px;

    border-radius: 18px;

    margin-top: 20px;

    border: 1px solid;
}

.waiting-panel {
    align-items: center;

    border-color:
        #dce5ef;

    background:
        linear-gradient(
            135deg,
            #f8fafc,
            #f1f5f9
        );
}

.login-panel {
    align-items: flex-start;

    border-color:
        #fed7aa;

    background:
        linear-gradient(
            135deg,
            #fffaf5,
            #fff3e8
        );
}

.status-icon {
    flex:
        0 0 62px;

    width: 62px;
    height: 62px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 17px;

    font-size: 25px;
}

.status-icon.lock {
    background:
        rgba(238,129,44,.13);

    color:
        var(--orange);
}

.status-icon.error {
    margin:
        0 auto 20px;

    background:
        #fee2e2;

    color:
        var(--danger);
}

.access-content,
.waiting-content {
    min-width: 0;
}

.access-label {
    display: block;

    margin-bottom: 6px;

    color:
        var(--orange);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: .08em;
}

.access-content h2,
.waiting-content h2 {
    margin: 0 0 7px;

    color:
        var(--navy);

    font-size: 20px;

    font-weight: 750;
}

.access-content p,
.waiting-content p {
    margin:
        0 0 8px;

    color:
        var(--muted);

    font-size: 13px;

    line-height: 1.65;
}

.access-note {
    font-size: 12px !important;
}


/* =========================================================
   COUNTER
========================================================= */

.don-counter {
    position: relative;

    flex:
        0 0 82px;

    width: 82px;
    height: 82px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        conic-gradient(
            var(--orange) 0deg,
            #e8edf2 0deg
        );

    transition:
        background .25s ease;
}

.don-counter::before {
    content: "";

    position: absolute;

    width: 68px;
    height: 68px;

    border-radius: 50%;

    background:
        white;
}

.don-counter span {
    position: relative;

    z-index: 1;

    color:
        var(--navy);

    font-size: 25px;

    font-weight: 800;
}

.progress-track {
    width: 100%;

    height: 7px;

    margin-top: 14px;

    overflow: hidden;

    border-radius: 999px;

    background:
        #e4e9ef;
}

.progress-bar {
    width: 0%;

    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--orange),
            #ffad70
        );

    transition:
        width .25s linear;
}

.download-meta {
    display: flex;

    flex-wrap: wrap;

    gap: 14px;

    margin-top: 10px;

    color:
        #64748b;

    font-size: 11px;
}

.download-meta span {
    display: inline-flex;

    align-items: center;

    gap: 5px;
}

.download-meta i {
    color:
        var(--orange);
}


/* =========================================================
   BUTTONS
========================================================= */

.don-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    margin-top: 13px;

    padding:
        11px 17px;

    border-radius: 10px;

    text-decoration: none;

    font-size: 13px;

    font-weight: 700;

    transition:
        .2s ease;
}

.don-button.primary {
    color: white;

    background:
        var(--orange);

    box-shadow:
        0 8px 18px
        rgba(238,129,44,.20);
}

.don-button.primary:hover {
    background:
        var(--orange-dark);

    color: white;

    transform:
        translateY(-1px);
}


/* =========================================================
   DONATION
========================================================= */

.donation-box {
    display: flex;

    gap: 20px;

    margin-top: 22px;

    padding:
        22px;

    border-radius: 18px;

    background:
        var(--navy);

    color: white;

    overflow: hidden;

    position: relative;
}

.donation-box::after {
    content: "";

    position: absolute;

    width: 220px;
    height: 220px;

    right: -90px;
    top: -100px;

    border-radius: 50%;

    background:
        rgba(238,129,44,.12);
}

.donation-icon {
    flex:
        0 0 52px;

    width: 52px;
    height: 52px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 15px;

    background:
        rgba(238,129,44,.16);

    color:
        #ffad70;

    font-size: 20px;
}

.donation-content {
    position: relative;

    z-index: 1;

    min-width: 0;
}

.donation-label {
    display: block;

    margin-bottom: 5px;

    color:
        #ffad70;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: .09em;
}

.donation-content h2 {
    margin:
        0 0 7px;

    font-size: 18px;

    line-height: 1.35;

    font-weight: 750;
}

.donation-content p {
    margin:
        0;

    color:
        #cbd5e1;

    font-size: 12px;

    line-height: 1.65;
}

.donation-actions {
    display: flex;

    flex-wrap: wrap;

    gap: 9px;

    margin-top: 14px;
}

.donation-button {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding:
        9px 13px;

    border-radius: 9px;

    text-decoration: none;

    font-size: 11px;

    font-weight: 700;

    transition:
        .2s ease;
}

.donation-button.light {
    background:
        rgba(255,255,255,.10);

    color:
        white;

    border:
        1px solid
        rgba(255,255,255,.12);
}

.donation-button.strong {
    background:
        var(--orange);

    color:
        white;
}

.donation-button:hover {
    transform:
        translateY(-1px);

    color: white;
}


/* =========================================================
   TRUST
========================================================= */

.trust-row {
    display: flex;

    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 18px;

    padding-top: 20px;

    color:
        #64748b;

    font-size: 11px;
}

.trust-row span {
    display: inline-flex;

    align-items: center;

    gap: 6px;
}

.trust-row i {
    color:
        var(--orange);
}


/* =========================================================
   ERROR
========================================================= */

.error-card {
    max-width: 550px;

    margin:
        12vh auto;

    text-align: center;
}

.error-card h1 {
    margin:
        0 0 8px;

    color:
        var(--navy);

    font-size: 28px;
}

.error-card p {
    margin:
        0 auto;

    max-width: 420px;

    color:
        var(--muted);

    line-height: 1.7;

    font-size: 14px;
}


/* =========================================================
   FOOTER
========================================================= */

.don-footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding:
        17px 4px;

    color:
        #8491a3;

    font-size: 11px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 700px) {

    .don-page {
        padding:
            14px
            12px
            25px;
    }

    .don-header {
        margin-bottom: 15px;
    }

    .don-logo {
        font-size: 21px;
    }

    .back-button {
        padding:
            8px 10px;

        font-size: 11px;
    }

    .back-button span {
        display: none;
    }

    .don-card {
        padding:
            22px 16px;
    }

    .don-title h1 {
        font-size: 30px;

        letter-spacing: -1px;
    }

    .book-preview {
        align-items: flex-start;

        gap: 14px;

        padding: 13px;
    }

    .book-cover {
        flex-basis: 78px;

        width: 78px;
        height: 108px;
    }

    .book-information h2 {
        font-size: 17px;
    }

    .book-subtitle {
        display: none;
    }

    .book-details {
        gap: 9px;
    }

    .access-panel {
        flex-direction: column;

        padding:
            19px;
    }

    .waiting-panel {
        align-items: center;

        text-align: center;
    }

    .waiting-content {
        width: 100%;
    }

    .download-meta {
        justify-content: center;
    }

    .donation-box {
        flex-direction: column;

        padding:
            19px;
    }

    .donation-icon {
        flex-basis: 45px;

        width: 45px;
        height: 45px;
    }

    .donation-actions {
        flex-direction: column;
    }

    .donation-button {
        justify-content: center;

        width: 100%;
    }

    .trust-row {
        flex-direction: column;

        gap: 8px;
    }

    .don-footer {
        flex-direction: column;

        text-align: center;

        gap: 6px;
    }
}

@media (max-width: 420px) {

    .don-title h1 {
        font-size: 26px;
    }

    .book-preview {
        display: grid;

        grid-template-columns:
            72px 1fr;
    }

    .book-cover {
        width: 72px;
        height: 100px;
    }

    .don-counter {
        width: 72px;
        height: 72px;
    }

    .don-counter::before {
        width: 59px;
        height: 59px;
    }

    .don-counter span {
        font-size: 22px;
    }
}