* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;

    --app-bg: #080908;
    --app-text: #ffffff;
    --app-muted-text: rgba(255, 255, 255, 0.62);
    --app-panel: #1c1c1e;
    --app-panel-strong: #0d0d0e;
    --app-border: rgba(255, 255, 255, 0.18);
    --app-button: #3f8cf5;
    --app-button-text: #ffffff;
    --app-link: #75a7ff;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

html {
    background: var(--app-bg);
}

body {
    min-height: 100vh;

    background-color: var(--app-bg);
    background-image:
        url("/static/background.webp?v=1");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;

    color: var(--app-text);
}

.app {
    min-height: 100vh;
    padding:
        24px
        20px
        32px;

    display: flex;
    flex-direction: column;
}

main {
    flex: 1;

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

.empty-state {
    text-align: center;
    max-width: 320px;
}

.empty-state h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.empty-state p {
    line-height: 1.5;
    color: var(--app-muted-text);
}


.card-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.card-container img {
    display: block;

    max-width: 100%;
    max-height: 68vh;

    object-fit: contain;

    border-radius: 18px;

    box-shadow:
        0 12px 35px
        rgba(0, 0, 0, 0.12);
}


.main-button {
    width: 100%;

    border: 0;
    border-radius: 15px;

    padding: 16px 20px;

    font-size: 17px;
    font-weight: 600;

    background: var(--app-button);
    color: var(--app-button-text);

    cursor: pointer;
}

.main-button:disabled,
.secondary-button:disabled {
    opacity: 0.5;
}

.secondary-button {
    width: 100%;
    margin-top: 10px;

    border: 1px solid var(--app-border);
    border-radius: 15px;

    padding: 13px 20px;

    font-size: 15px;
    font-weight: 600;

    background: transparent;

    color: var(--app-text);

    cursor: pointer;
}


.modal {
    position: fixed;

    inset: 0;

    background:
        rgba(0, 0, 0, 0.62);

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

    padding: 24px;

    z-index: 100;
}

.modal-content {
    width: 100%;
    max-width: 360px;

    background: var(--app-panel);

    border-radius: 22px;

    padding: 28px 24px;

    text-align: center;
}

.modal-content h2 {
    margin-top: 0;
    font-size: 26px;
}

.modal-content p {
    line-height: 1.5;
    color: var(--app-muted-text);
}

.modal-content .main-button {
    margin-top: 14px;
}

.hidden {
    display: none !important;
}

.purchase-info {
    margin:
        22px
        0
        16px;

    text-align: center;
}

.purchase-info > strong {
    display: block;

    margin-bottom: 10px;

    font-size: 17px;
}

.legal-links {
    display: flex;

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

    flex-wrap: wrap;

    gap: 7px;

    font-size: 13px;
}

.legal-links a {
    color: var(--app-link);

    text-decoration: underline;
}

/* ---------------------------------------------------------
   Developer tools
   --------------------------------------------------------- */

.dev-button {
    position: fixed;
    top: calc(10px + env(safe-area-inset-top));
    right: 12px;

    z-index: 90;

    border: 0;
    border-radius: 999px;

    padding: 8px 12px;

    font-size: 13px;
    font-weight: 600;

    background: var(--app-panel);
    color: var(--app-text);

    box-shadow:
        0 4px 16px
        rgba(0, 0, 0, 0.12);

    cursor: pointer;
}

#dev-panel {
    z-index: 250;
}

.dev-panel-content {
    max-height: 88vh;
    overflow-y: auto;

    text-align: left;
}

.dev-panel-content h2 {
    text-align: center;
    margin-bottom: 14px;
}

.dev-current-state {
    margin-bottom: 22px;

    padding: 10px 12px;

    border-radius: 12px;

    background: var(--app-panel-strong);

    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.dev-section {
    margin-top: 22px;
}

.dev-section h3 {
    margin:
        0
        0
        10px;

    font-size: 15px;
}

.dev-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 9px;
}

.dev-action,
.dev-close {
    border:
        1px solid
        rgba(127, 127, 127, 0.28);

    border-radius: 12px;

    padding: 12px 10px;

    background: var(--app-panel-strong);
    color: var(--app-text);

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}

.dev-close {
    width: 100%;

    margin-top: 24px;

    background: var(--app-button);
    color: var(--app-button-text);
}

.dev-preview-exit {
    position: fixed;

    left: 50%;
    bottom: calc(
        16px + env(safe-area-inset-bottom)
    );

    transform: translateX(-50%);

    z-index: 300;

    border: 0;
    border-radius: 999px;

    padding: 11px 16px;

    background: var(--app-button);
    color: var(--app-button-text);

    font-size: 13px;
    font-weight: 600;

    box-shadow:
        0 6px 20px
        rgba(0, 0, 0, 0.18);

    cursor: pointer;
}

