.presentation-page {
    --p-accent: #4f8cff;
    --p-accent-strong: #2f73f3;
    --p-accent-soft: rgba(79, 140, 255, .14);
    --p-border: rgba(117, 157, 224, .25);
    --p-border-strong: rgba(79, 140, 255, .78);
    --p-surface: rgba(10, 25, 49, .92);
    --p-surface-2: rgba(14, 32, 60, .96);
    --p-muted: #90a9cc;
    --p-success: #54d8a5;
}

.presentation-page .page-head {
    margin-bottom: 18px;
}

.presentation-page .page-head h1 {
    margin-bottom: 6px;
    letter-spacing: -.02em;
}

.presentation-page .page-head p {
    color: var(--p-muted);
}

.presentation-page .presentation-form {
    display: grid;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--p-border);
    background: linear-gradient(180deg, rgba(14, 31, 59, .98), rgba(8, 22, 43, .98));
    box-shadow: 0 22px 60px rgba(0, 0, 0, .18);
}

.presentation-page .presentation-form > label,
.presentation-page .presentation-form legend {
    font-weight: 700;
}

.presentation-page .presentation-form > label {
    display: grid;
    gap: 9px;
}

.presentation-page .presentation-form fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.presentation-page .presentation-form legend {
    margin-bottom: 10px;
}

.presentation-page .presentation-form .field,
.presentation-page .presentation-form select {
    border-color: var(--p-border);
    background: rgba(4, 16, 34, .58);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.presentation-page .presentation-form .field:focus,
.presentation-page .presentation-form select:focus {
    border-color: var(--p-border-strong);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, .12);
    background: rgba(6, 20, 42, .92);
}

.presentation-page #presentation-files {
    width: 100%;
    padding: 8px;
    color: var(--p-muted);
    border: 1px dashed var(--p-border);
    border-radius: 14px;
    background: rgba(4, 15, 31, .45);
}

.presentation-page #presentation-files::file-selector-button {
    margin-right: 10px;
    padding: 9px 13px;
    border: 1px solid rgba(79, 140, 255, .4);
    border-radius: 10px;
    color: #eaf2ff;
    background: rgba(79, 140, 255, .13);
    font-weight: 700;
    cursor: pointer;
}

.presentation-page #presentation-file-list {
    margin-top: -12px;
    line-height: 1.45;
}

.presentation-page .presentation-choices,
.presentation-page .presentation-options,
.presentation-model-picker,
.presentation-style-picker {
    display: grid;
    gap: 9px;
}

.presentation-page .presentation-choices {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.presentation-page .presentation-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.presentation-page .presentation-choices .secondary,
.presentation-page .presentation-options .secondary,
.presentation-model-choice,
.presentation-style-choice {
    position: relative;
    min-height: 52px;
    padding: 11px 14px;
    border: 1px solid var(--p-border);
    border-radius: 14px;
    color: #eaf2ff;
    background: rgba(9, 25, 49, .72);
    text-align: left;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.presentation-page .presentation-choices .secondary {
    text-align: center;
    font-weight: 800;
}

.presentation-page .presentation-options .secondary b,
.presentation-model-choice strong,
.presentation-style-choice strong {
    display: block;
    font-size: 15px;
    line-height: 1.25;
}

.presentation-page .presentation-options .secondary small,
.presentation-model-choice small,
.presentation-style-choice small {
    display: block;
    margin-top: 4px;
    color: var(--p-muted);
    font-size: 12px;
    line-height: 1.35;
}

.presentation-page .presentation-choices .secondary:hover,
.presentation-page .presentation-options .secondary:hover,
.presentation-model-choice:hover,
.presentation-style-choice:hover {
    transform: translateY(-1px);
    border-color: rgba(79, 140, 255, .48);
    background: rgba(17, 40, 74, .88);
}

.presentation-page .presentation-choices .secondary.active,
.presentation-page .presentation-options .secondary.active,
.presentation-model-choice.active,
.presentation-style-choice.active {
    border-color: var(--p-border-strong) !important;
    background: linear-gradient(135deg, rgba(47, 115, 243, .28), rgba(28, 73, 151, .18)) !important;
    box-shadow: 0 0 0 2px rgba(79, 140, 255, .12), inset 0 0 28px rgba(79, 140, 255, .05);
    color: #fff !important;
}

.presentation-page .presentation-choices .secondary.active::after,
.presentation-page .presentation-options .secondary.active::after,
.presentation-model-choice.active::after,
.presentation-style-choice.active::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 9px;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--p-accent-strong);
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 4px 14px rgba(47, 115, 243, .3);
}

.presentation-page .presentation-options .secondary.active small,
.presentation-model-choice.active small,
.presentation-style-choice.active small {
    color: #bcd2ff;
}

.presentation-page #presentation-custom-slides {
    min-width: 0;
    text-align: center;
    font-weight: 800;
}

.presentation-model-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.presentation-style-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.presentation-model-choice,
.presentation-style-choice {
    width: 100%;
    font: inherit;
}

.presentation-model-select-enhanced,
.presentation-style-select-enhanced {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.presentation-page .presentation-cost {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid rgba(79, 140, 255, .28);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(22, 50, 91, .62), rgba(8, 24, 49, .72));
}

.presentation-page .presentation-cost h2 {
    margin: 0 0 2px;
    font-size: 18px;
}

.presentation-page .presentation-cost p {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    color: var(--p-muted);
}

.presentation-page .presentation-cost p b {
    color: #eef4ff;
}

.presentation-page .presentation-cost p span {
    text-align: right;
}

.presentation-page #p-total {
    display: block;
    padding-top: 10px;
    border-top: 1px solid rgba(139, 172, 225, .14);
    color: #fff;
    font-size: 16px;
}

.presentation-page #create-presentation {
    min-height: 54px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(47, 115, 243, .2);
}

.presentation-page .presentation-progress {
    display: grid;
    gap: 10px;
    padding: 20px;
    border: 1px solid var(--p-border);
    background: linear-gradient(180deg, rgba(14, 31, 59, .98), rgba(8, 22, 43, .98));
}

.presentation-page .presentation-progress p {
    margin: 0;
    padding: 12px 13px;
    border-radius: 12px;
    background: rgba(8, 24, 48, .7);
}

.presentation-ready-head {
    position: relative;
}

.presentation-success-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 6px 10px;
    border: 1px solid rgba(84, 216, 165, .35);
    border-radius: 999px;
    color: #8aefc7;
    background: rgba(84, 216, 165, .1);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.presentation-result-hero {
    overflow: hidden;
    position: relative;
    padding: 22px;
    border: 1px solid rgba(79, 140, 255, .34);
    background:
        radial-gradient(circle at 88% 8%, rgba(79, 140, 255, .18), transparent 34%),
        linear-gradient(160deg, rgba(16, 37, 70, .98), rgba(7, 21, 42, .98));
    box-shadow: 0 24px 65px rgba(0, 0, 0, .2);
}

.presentation-result-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.presentation-result-icon {
    flex: 0 0 auto;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(79, 140, 255, .42);
    border-radius: 14px;
    color: #fff;
    background: rgba(79, 140, 255, .14);
    font-size: 25px;
}

.presentation-result-hero h2 {
    margin: 0;
    font-size: clamp(21px, 4vw, 28px);
    line-height: 1.2;
}

.presentation-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 14px 0 18px;
}

.presentation-meta-chips span,
.presentation-library-meta span {
    padding: 6px 9px;
    border: 1px solid rgba(137, 171, 226, .18);
    border-radius: 999px;
    color: #b9cae4;
    background: rgba(3, 13, 29, .34);
    font-size: 12px;
}

.presentation-download {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    margin: 0 0 20px;
    border-radius: 14px;
    font-size: 16px;
    text-decoration: none;
}

.presentation-cost-heading {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--p-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.presentation-cost-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.presentation-cost-item {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(137, 171, 226, .16);
    border-radius: 13px;
    background: rgba(4, 16, 34, .48);
}

.presentation-cost-item small {
    display: block;
    margin-bottom: 5px;
    color: var(--p-muted);
    line-height: 1.25;
}

.presentation-cost-item strong {
    font-size: 14px;
}

.presentation-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding: 13px 14px;
    border-radius: 13px;
    background: rgba(79, 140, 255, .1);
}

.presentation-total span {
    color: var(--p-muted);
}

.presentation-total strong {
    font-size: 17px;
}

.presentation-file-expiry {
    margin: 13px 0 0;
    color: var(--p-muted);
    font-size: 12px;
}

.presentation-new-button {
    width: 100%;
    min-height: 48px;
    margin-top: 14px;
    border-radius: 13px;
}

.presentation-library {
    margin-top: 24px;
}

.presentation-library-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.presentation-library-head h2 {
    margin: 0;
    font-size: 20px;
}

.presentation-library-head p {
    margin: 3px 0 0;
    color: var(--p-muted);
    font-size: 13px;
}

.presentation-library-count {
    color: var(--p-muted);
    font-size: 12px;
    white-space: nowrap;
}

.presentation-library-grid {
    display: grid;
    gap: 10px;
}

.presentation-library-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--p-border);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(14, 31, 58, .88), rgba(7, 21, 42, .88));
}

.presentation-library-card.is-current {
    border-color: rgba(79, 140, 255, .56);
    box-shadow: inset 3px 0 0 var(--p-accent);
}

.presentation-library-card h3 {
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.3;
}

.presentation-library-date {
    display: block;
    color: var(--p-muted);
    font-size: 11px;
}

.presentation-library-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 9px;
}

.presentation-library-actions {
    display: grid;
    justify-items: end;
    gap: 7px;
}

.presentation-library-expiry {
    color: #abc2e5;
    font-size: 11px;
    white-space: nowrap;
}

.presentation-library-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(79, 140, 255, .42);
    border-radius: 11px;
    color: #fff;
    background: rgba(79, 140, 255, .14);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.presentation-library-download:hover {
    background: rgba(79, 140, 255, .22);
}

.presentation-library-empty {
    padding: 18px;
    border: 1px dashed var(--p-border);
    border-radius: 14px;
    color: var(--p-muted);
    text-align: center;
}

@media (max-width: 680px) {
    .presentation-page .presentation-choices {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .presentation-page .presentation-options,
    .presentation-model-picker,
    .presentation-style-picker,
    .presentation-cost-grid {
        grid-template-columns: 1fr;
    }

    .presentation-page .presentation-form {
        padding: 15px;
    }

    .presentation-result-hero {
        padding: 17px;
    }

    .presentation-library-card {
        grid-template-columns: 1fr;
    }

    .presentation-library-actions {
        grid-template-columns: 1fr auto;
        align-items: center;
        justify-items: stretch;
    }

    .presentation-library-download {
        min-width: 112px;
    }
}
