:root {
    color-scheme: dark;
    --background: #050505;
    --card: #1f1d20;
    --panel: #302e31;
    --text: #f7f7f7;
    --muted: #b5b1b6;
    --accent: #ff9800;
    --accent-hover: #ffad24;
    --code: #e3a63b;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--background);
}

body {
    min-width: 280px;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 50% -15%, rgba(29, 29, 32, .6), transparent 34rem),
        var(--background);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.store-shell {
    width: min(calc(100% - 28px), 600px);
    margin: 0 auto;
    padding: 38px 0 24px;
}

.store-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.store-logo {
    display: block;
    width: 172px;
    height: 172px;
    object-fit: contain;
    margin: 0 auto;
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .4));
}

.store-header h1 {
    margin: 48px 0 31px;
    color: #fff;
    font-size: clamp(23px, 5vw, 29px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
    text-transform: uppercase;
}

.apps-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 24px;
}

.app-card {
    width: 100%;
    padding: 26px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .025);
    border-radius: 15px;
    background: var(--card);
    box-shadow: 0 16px 44px rgba(0, 0, 0, .38);
}

.app-name {
    margin: 0;
    color: #fff;
    font-size: clamp(25px, 5.5vw, 33px);
    font-weight: 600;
    line-height: 1.18;
    text-align: center;
    text-transform: uppercase;
}

.app-platform {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.app-image-wrap {
    position: relative;
    width: 100%;
    margin-top: 22px;
    overflow: hidden;
    border-radius: 2px;
    background: #101013;
    aspect-ratio: 16 / 9;
}

.app-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: rgba(9, 9, 10, .68);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.play-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 54%;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 23px solid #fff;
    transform: translate(-50%, -50%);
}

.app-description {
    margin: 17px 4px 0;
    color: #d1ced2;
    font-size: 15px;
    line-height: 1.55;
    text-align: center;
}

.code-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 60px;
    margin: 15px 0 0;
    padding: 12px 15px;
    gap: 7px;
    border: 0;
    border-radius: 7px;
    color: var(--code);
    background: var(--panel);
    font: inherit;
    font-size: clamp(16px, 4vw, 21px);
    line-height: 1.25;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.code-bar span,
.code-bar strong {
    font-weight: 700;
}

.code-bar:hover {
    background: #39363a;
}

.code-bar:active {
    transform: scale(.995);
}

.download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 57px;
    margin-top: 14px;
    padding: 12px 18px;
    border-radius: 7px;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 8px 20px rgba(255, 152, 0, .13);
    font-size: clamp(17px, 4.2vw, 21px);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.download-button:hover {
    color: #fff;
    background: var(--accent-hover);
    box-shadow: 0 10px 26px rgba(255, 152, 0, .22);
    transform: translateY(-1px);
}

.download-button--disabled {
    color: #b2afb3;
    background: #3b383c;
    box-shadow: none;
    cursor: not-allowed;
}

.store-message {
    padding: 22px;
    border-radius: 12px;
    color: #dedbdf;
    background: var(--card);
    line-height: 1.5;
    text-align: center;
}

.store-message--error {
    border: 1px solid rgba(255, 102, 102, .35);
    color: #ffd0d0;
}

.store-footer {
    padding: 30px 0 8px;
    text-align: center;
}

.store-footer a {
    color: #666166;
    font-size: 12px;
    text-decoration: none;
}

.store-footer a:hover {
    color: #aaa5aa;
}

.copy-toast {
    position: fixed;
    right: 50%;
    bottom: max(22px, env(safe-area-inset-bottom));
    z-index: 20;
    padding: 11px 17px;
    border-radius: 999px;
    color: #171717;
    background: #fff;
    box-shadow: 0 10px 35px rgba(0, 0, 0, .45);
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transform: translate(50%, 18px);
    transition: opacity .2s ease, transform .2s ease;
}

.copy-toast--visible {
    opacity: 1;
    transform: translate(50%, 0);
}

:focus-visible {
    outline: 3px solid rgba(255, 176, 55, .92);
    outline-offset: 3px;
}

@media (max-width: 520px) {
    .store-shell {
        width: min(calc(100% - 22px), 600px);
        padding-top: 24px;
    }

    .store-logo {
        width: 142px;
        height: 142px;
    }

    .store-header h1 {
        margin: 40px 0 27px;
    }

    .app-card {
        padding: 20px;
        border-radius: 13px;
    }

    .app-image-wrap {
        margin-top: 18px;
    }

    .play-icon {
        width: 58px;
        height: 58px;
    }

    .code-bar {
        flex-wrap: wrap;
        min-height: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
