:root {
    --c-bar-left: #7e0e62;
    --c-bar-right: #450435;
    --c-page-bg: #f9e2ae;
}

* { box-sizing: border-box; }

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

body {
    background: var(--c-page-bg);
    color: var(--c-bar-left);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-text-size-adjust: none;
    transition: background-color 240ms ease;

    min-height: 100vh;
    padding: 32px 24px;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: center;
    justify-items: center;
}

a {
    color: var(--c-bar-right);
}

.page {
    width: 100%;
    max-width: 960px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 48px;
}

a.logo {
    display: block;
    width: min(86vw, 720px);
    max-width: 100%;
    line-height: 0;
    text-decoration: none;
}

a.logo svg {
    width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
}

.footer {
    padding-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
    text-align: center;
}

.footer a {
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Home: app grid */
.app-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.app-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--c-bar-left);
    background: rgba(255, 255, 255, 0.18);
    transition: background-color 160ms ease, transform 160ms ease;
}

.app-card a:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-2px);
}

.app-icon {
    width: 96px;
    height: 96px;
    border-radius: 22%;
    object-fit: cover;
}

.app-name {
    font-weight: 600;
    font-size: 18px;
}

.app-tagline {
    font-size: 14px;
    text-align: center;
    opacity: 0.8;
}

.app-version {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}

/* App page */
.app-page {
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

.app-header {
    text-align: center;
    margin-bottom: 32px;
}

.app-icon-large {
    width: 128px;
    height: 128px;
    border-radius: 22%;
    object-fit: cover;
    margin-bottom: 12px;
}

.app-header h1 {
    margin: 8px 0 4px;
    font-size: 32px;
}

.tagline {
    margin: 0;
    opacity: 0.8;
    font-size: 18px;
}

.download {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 32px 0;
}

.btn-download {
    display: inline-block;
    background: var(--c-bar-right);
    color: var(--c-page-bg);
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 160ms ease;
}

.btn-download:hover { opacity: 0.9; }

.download small {
    width: 100%;
    text-align: center;
    opacity: 0.7;
    font-size: 13px;
}

.badge-mas img {
    height: 48px;
}

.description {
    margin: 32px 0;
}

.description h1, .description h2, .description h3 {
    margin-top: 1.5em;
}

.description p {
    margin: 0 0 1em;
}

.description code {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.description pre {
    background: rgba(0, 0, 0, 0.08);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
}

.screenshots {
    display: grid;
    gap: 16px;
    margin: 32px 0;
}

.screenshots img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.screenshots figcaption {
    margin-top: 4px;
    font-size: 14px;
    opacity: 0.75;
    text-align: center;
}

.source {
    margin: 32px 0;
    font-size: 14px;
    opacity: 0.7;
    text-align: center;
}

@media (max-width: 480px) {
    a.logo { width: 92vw; }
    .app-header h1 { font-size: 26px; }
}
