@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    --blue: #2E3192;
    --gold: #FFC72C;
    --light: #F1F3F6;
    --dark: #1A1C21;
    --white: #ffffff;
    --muted: #687085;
    --success: #16a34a;
    --danger: #dc2626;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Poppins', Arial, sans-serif;
    background: var(--light);
    color: var(--dark);
}

.hero {
    background:
        radial-gradient(circle at 20% 20%, rgba(255,199,44,.24), transparent 32%),
        linear-gradient(135deg, var(--blue), #17195f 72%);
    color: white;
    padding: 56px 20px 42px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -90px;
    width: 260px;
    height: 260px;
    border: 32px solid rgba(255,255,255,.08);
    border-radius: 50%;
}

.hero-inner {
    width: min(1100px, 100%);
    margin: auto;
    position: relative;
    z-index: 1;
}

.brand-pill {
    display: inline-flex;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.22);
    color: var(--gold);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

h1, h2, p { margin-top: 0; }

.hero h1 {
    font-size: clamp(34px, 7vw, 64px);
    margin-bottom: 8px;
    letter-spacing: -1.5px;
}

.hero p {
    font-size: 18px;
    color: rgba(255,255,255,.82);
    max-width: 720px;
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 28px auto;
}

.notice, .empty, .install-help, .panel, .alert {
    background: white;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 18px 45px rgba(26,28,33,.08);
    margin-bottom: 22px;
}

.notice {
    border-left: 6px solid var(--gold);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 18px;
}

.card {
    background: white;
    border-radius: 26px;
    padding: 22px;
    box-shadow: 0 18px 45px rgba(26,28,33,.09);
    border: 1px solid rgba(46,49,146,.08);
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.card-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.app-type {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--blue);
    background: rgba(46,49,146,.08);
    border-radius: 999px;
    padding: 6px 10px;
    margin-bottom: 10px;
}

.card h2 {
    font-size: 22px;
    line-height: 1.15;
    margin-bottom: 10px;
}

.version {
    background: var(--gold);
    color: var(--dark);
    font-weight: 800;
    border-radius: 14px;
    padding: 8px 10px;
    white-space: nowrap;
}

.description {
    color: var(--muted);
    flex: 1;
}

.meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--muted);
    margin: 16px 0;
}

.download-btn, .secondary-btn, .small-btn, .danger-btn {
    appearance: none;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    border-radius: 16px;
    padding: 13px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    transition: transform .15s ease, box-shadow .15s ease;
}

.download-btn {
    background: linear-gradient(135deg, var(--gold), #ffd960);
    color: var(--dark);
    box-shadow: 0 10px 24px rgba(255,199,44,.28);
    width: 100%;
}

.download-btn:hover, .secondary-btn:hover, .small-btn:hover, .danger-btn:hover {
    transform: translateY(-1px);
}

.install-help ol {
    padding-left: 20px;
    color: var(--muted);
}

footer {
    text-align: center;
    padding: 34px 20px;
    color: var(--muted);
}

.admin-header {
    background: var(--dark);
    color: white;
    padding: 22px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.admin-header h1 {
    margin-bottom: 4px;
}

.admin-header p {
    margin-bottom: 0;
    color: rgba(255,255,255,.72);
}

.secondary-btn {
    background: white;
    color: var(--blue);
}

.admin-container {
    max-width: 980px;
}

.login-panel {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

form label {
    display: block;
    font-weight: 700;
    margin: 14px 0;
}

input, select, textarea {
    width: 100%;
    border: 1px solid rgba(26,28,33,.16);
    border-radius: 15px;
    padding: 13px 14px;
    font: inherit;
    margin-top: 7px;
    background: white;
}

textarea {
    resize: vertical;
}

.hint {
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted);
}

.alert.success {
    border-left: 6px solid var(--success);
}

.alert.error {
    border-left: 6px solid var(--danger);
}

.upload-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
}

.upload-form label:nth-child(5),
.upload-form label:nth-child(6),
.upload-form button {
    grid-column: 1 / -1;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border-radius: 18px;
    background: var(--light);
}

.admin-item span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.admin-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-actions form {
    margin: 0;
}

.small-btn {
    background: var(--blue);
    color: white;
    padding: 10px 13px;
    font-size: 13px;
}

.danger-btn {
    background: var(--danger);
    color: white;
    padding: 10px 13px;
    font-size: 13px;
}

@media (max-width: 720px) {
    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .upload-form {
        display: block;
    }

    .admin-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-actions {
        width: 100%;
        justify-content: space-between;
    }

    .small-btn, .danger-btn {
        width: 100%;
    }

    .admin-actions form {
        width: 100%;
    }
}