:root {
    --bg: #07111f;
    --bg-soft: rgba(10, 20, 40, 0.72);
    --card: rgba(13, 24, 48, 0.88);
    --card-border: rgba(148, 181, 255, 0.18);
    --text: #f5f8ff;
    --muted: #a8b6d7;
    --primary: #5b8cff;
    --primary-strong: #2e68ff;
    --success: #35d49a;
    --danger: #ff7f90;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Noto Sans Georgian", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(91, 140, 255, 0.35), transparent 30%),
        radial-gradient(circle at top right, rgba(53, 212, 154, 0.2), transparent 25%),
        linear-gradient(180deg, #07111f 0%, #0a1630 100%);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 60px;
}

.hero {
    padding: 28px 0 34px;
}

.hero__badge {
    display: inline-flex;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(91, 140, 255, 0.14);
    border: 1px solid rgba(91, 140, 255, 0.28);
    color: #bcd0ff;
    font-size: 14px;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.04;
    margin: 0 0 14px;
    max-width: 760px;
}

.hero p {
    max-width: 720px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--muted);
    margin: 0;
}

.hero-actions {
    margin-top: 22px;
}

.ghost-button,
.footer-link,
.copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    text-decoration: none;
}

.ghost-button {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.sidebar {
    display: grid;
    gap: 24px;
}

.card {
    background: var(--card);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 28px;
}

.section-heading h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.section-heading p {
    margin: 0 0 22px;
    color: var(--muted);
    line-height: 1.6;
}

.build-form {
    display: grid;
    gap: 16px;
}

.feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.feature-pill {
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(91, 140, 255, 0.12);
    border: 1px solid rgba(91, 140, 255, 0.2);
    color: #dbe7ff;
    font-size: 13px;
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    font-size: 14px;
    color: #dce5fb;
    font-weight: 600;
}

.field small {
    color: var(--muted);
}

input[type="text"],
input[type="url"],
input[type="file"] {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(179, 204, 255, 0.16);
    background: rgba(4, 10, 24, 0.5);
    color: var(--text);
    padding: 15px 16px;
    outline: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

input:focus {
    border-color: rgba(91, 140, 255, 0.75);
    transform: translateY(-1px);
}

.package-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.primary-button,
.secondary-button,
.tab-button {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.primary-button {
    padding: 16px 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 16px 34px rgba(46, 104, 255, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(46, 104, 255, 0.42);
}

.primary-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.secondary-button {
    padding: 0 18px;
    border-radius: 16px;
    background: rgba(91, 140, 255, 0.18);
    color: #d8e5ff;
}

.preview {
    min-height: 72px;
    border: 1px dashed rgba(179, 204, 255, 0.2);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    overflow: hidden;
    padding: 12px;
}

.preview img {
    max-height: 120px;
    max-width: 100%;
    border-radius: 14px;
}

.preview-panel {
    margin-top: 18px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 14px;
}

.preview-panel__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.preview-panel__header h3 {
    margin: 0;
}

.preview-panel__header span {
    color: var(--muted);
    font-size: 14px;
}

.app-shell-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(6, 14, 28, 0.55);
    border: 1px solid rgba(91, 140, 255, 0.16);
}

.app-shell-preview__icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--success));
    color: white;
    font-size: 24px;
    font-weight: 800;
}

.app-shell-preview p,
.last-build p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.last-build {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

.last-build a,
.footer-link {
    color: #c8d8ff;
    margin-top: 8px;
}

.form-message {
    min-height: 20px;
    margin: 0;
    color: var(--muted);
}

.form-message.is-error {
    color: var(--danger);
}

.form-message.is-success {
    color: var(--success);
}

.is-hidden {
    display: none;
}

.progress-bar {
    width: 100%;
    height: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar__fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #35d49a, #5b8cff);
    transition: width 0.35s ease;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    color: var(--muted);
}

.stage-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.stage-item {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    border: 1px solid transparent;
}

.stage-item.is-active {
    color: var(--text);
    border-color: rgba(53, 212, 154, 0.35);
    background: rgba(53, 212, 154, 0.09);
}

.download-list {
    display: grid;
    gap: 14px;
}

.download-item {
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(91, 140, 255, 0.18);
    background: rgba(6, 14, 28, 0.55);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.download-item:hover {
    transform: translateY(-2px);
    border-color: rgba(91, 140, 255, 0.45);
}

.download-item span {
    color: var(--muted);
    font-size: 14px;
}

.metadata-grid {
    display: grid;
    gap: 14px;
}

.metadata-box {
    padding: 16px;
    border-radius: 18px;
    background: rgba(6, 14, 28, 0.55);
    border: 1px solid rgba(91, 140, 255, 0.16);
}

.metadata-box__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.metadata-box textarea {
    width: 100%;
    min-height: 220px;
    resize: vertical;
    border: 1px solid rgba(179, 204, 255, 0.16);
    background: rgba(4, 10, 24, 0.5);
    color: var(--text);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
}

.copy-button {
    border: 0;
    padding: 10px 12px;
    background: rgba(91, 140, 255, 0.18);
    color: #dbe7ff;
    cursor: pointer;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.tab-button {
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #d8e5ff;
}

.tab-button.is-active {
    background: rgba(91, 140, 255, 0.2);
    color: white;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

.steps-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 12px;
    color: var(--muted);
    line-height: 1.55;
}

.steps-list a {
    color: #b7caff;
}

.footer {
    margin-top: 26px;
    display: grid;
    gap: 14px;
    padding: 22px 4px 0;
    color: var(--muted);
}

.footer strong {
    color: var(--text);
}

.admin-shell {
    display: grid;
    gap: 24px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.stat-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(6, 14, 28, 0.55);
    border: 1px solid rgba(91, 140, 255, 0.16);
}

.stat-card strong {
    display: block;
    font-size: 28px;
    margin-top: 8px;
}

.table-wrap {
    overflow: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: top;
}

.status-badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
}

.status-badge.status-completed {
    background: rgba(53, 212, 154, 0.14);
    color: #88f0c9;
}

.status-badge.status-building,
.status-badge.status-queued {
    background: rgba(91, 140, 255, 0.14);
    color: #c8d8ff;
}

.status-badge.status-failed {
    background: rgba(255, 127, 144, 0.14);
    color: #ffc1ca;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

details {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
}

summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 600;
}

details p {
    margin: 10px 0 0;
}

@media (max-width: 960px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 20px, 1200px);
        padding-top: 24px;
    }

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

    .package-row,
    .progress-meta,
    .tabs {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .preview-panel__header,
    .admin-topbar,
    .metadata-box__header {
        flex-direction: column;
        align-items: flex-start;
    }
}
