* {
    box-sizing: border-box;
}

:root {
    --bg: #07111f;
    --bg2: #0b1b31;
    --card: #10243d;
    --text: #edf6ff;
    --muted: #9fb4cc;
    --primary: #29b6ff;
    --primary2: #1d7dff;
    --border: rgba(255,255,255,.12);
    --shadow: 0 20px 60px rgba(0,0,0,.35);
}

html.light-theme {
    --bg: #f5f8ff;
    --bg2: #ffffff;
    --card: #ffffff;
    --text: #0b1b31;
    --muted: #52667d;
    --primary: #0878d8;
    --primary2: #29b6ff;
    --border: rgba(7,17,31,.12);
    --shadow: 0 18px 45px rgba(17, 38, 70, .12);
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background .25s ease, color .25s ease;
}

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

.container {
    width: min(1120px, 92%);
    margin: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(7,17,31,.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

html.light-theme .site-header {
    background: rgba(255,255,255,.88);
}

.nav {
    min-height: 76px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    color: #fff;
    font-weight: 800;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand small {
    display: block;
    color: var(--muted);
    margin-top: -3px;
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav a {
    color: var(--muted);
    font-weight: 600;
}

nav a:hover {
    color: var(--text);
}

.admin-link {
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

html.light-theme .theme-toggle {
    background: rgba(7,17,31,.05);
}

.menu-btn {
    display: none;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 20px;
}

.hero {
    padding: 90px 0;
    background:
        radial-gradient(circle at top right, rgba(41,182,255,.25), transparent 34%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}

.hero-grid, .app-detail-grid, .two-col, .footer-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 36px;
    align-items: center;
}

.badge, .platform {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid rgba(41,182,255,.35);
    color: #8bdcff;
    background: rgba(41,182,255,.08);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

h1 {
    font-size: clamp(38px, 7vw, 68px);
    line-height: 1.05;
    margin: 18px 0;
}

h1 span {
    color: var(--primary);
}

h2 {
    font-size: 34px;
    margin: 0 0 12px;
}

p {
    color: var(--muted);
}

.hero p {
    font-size: 19px;
    max-width: 640px;
}

.hero-buttons, .button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 14px;
    padding: 13px 18px;
    font-weight: 800;
    border: 1px solid var(--border);
    cursor: pointer;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    color: #fff;
    border: 0;
}

.btn.secondary {
    background: var(--card);
    color: #fff;
}

.btn.small {
    padding: 9px 13px;
    font-size: 14px;
}

.stats {
    display: flex;
    gap: 14px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.stats div {
    min-width: 130px;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
}

.stats strong, .stats small {
    display: block;
}

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

.hero-card, .content-card, .contact-card, .empty-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 26px;
    box-shadow: var(--shadow);
}

.terminal {
    background: #050b13;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.terminal-top {
    padding: 14px;
    display: flex;
    gap: 8px;
    background: var(--card);
}

.terminal-top span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #29b6ff;
}

.terminal pre {
    margin: 0;
    padding: 22px;
    color: #98e8ff;
    overflow: auto;
}

.section {
    padding: 70px 0;
}

.section.light {
    background: var(--bg2);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 26px;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.app-card {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow);
    transition: .2s ease;
}

.app-card:hover {
    transform: translateY(-5px);
    border-color: rgba(41,182,255,.45);
}

.app-icon, .big-app-icon {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    color: #fff;
    font-weight: 900;
    font-size: 32px;
    overflow: hidden;
}

.app-icon img, .big-app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.big-app-icon {
    width: 170px;
    height: 170px;
    border-radius: 38px;
    font-size: 70px;
}

.card-link {
    margin-top: auto;
    color: #8bdcff;
    font-weight: 800;
}

.page-hero, .app-detail-hero {
    padding: 70px 0;
    background:
        radial-gradient(circle at top right, rgba(41,182,255,.22), transparent 32%),
        var(--bg2);
    border-bottom: 1px solid var(--border);
}

.page-hero h1, .app-detail-hero h1 {
    margin: 8px 0;
}

.detail-content {
    display: grid;
    gap: 22px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.feature-item, .info-list div {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
}

.screenshots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.screenshots img {
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--border);
}

.readable {
    max-width: 850px;
}

.site-footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 50px 0 0;
}

.footer-grid {
    grid-template-columns: 1.3fr .7fr .8fr;
    align-items: start;
}

.site-footer a {
    display: block;
    color: var(--muted);
    margin: 8px 0;
}

.copyright {
    border-top: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
    padding: 18px;
    margin-top: 30px;
}

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

@media (max-width: 850px) {
    .menu-btn {
        display: block;
    }

    nav {
        display: none;
        position: absolute;
        top: 76px;
        right: 4%;
        width: 92%;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 18px;
    }

    nav.show {
        display: flex;
    }

    .hero-grid, .app-detail-grid, .two-col, .footer-grid {
        grid-template-columns: 1fr;
    }

    .app-grid, .screenshots, .feature-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: block;
    }
}


html.light-theme .hero-card,
html.light-theme .content-card,
html.light-theme .contact-card,
html.light-theme .empty-box,
html.light-theme .app-card {
    background: #ffffff;
}

html.light-theme .terminal {
    background: #eef5ff;
}

html.light-theme .terminal pre {
    color: #0b6dbd;
}

html.light-theme .terminal-top {
    background: rgba(7,17,31,.06);
}

html.light-theme .btn.secondary,
html.light-theme .feature-item,
html.light-theme .info-list div,
html.light-theme .stats div {
    background: rgba(7,17,31,.045);
}

html.light-theme .page-hero,
html.light-theme .app-detail-hero {
    background:
        radial-gradient(circle at top right, rgba(41,182,255,.18), transparent 32%),
        var(--bg2);
}


.not-found {
    min-height: 70vh;
    display: grid;
    place-items: center;
    padding: 70px 0;
    background:
        radial-gradient(circle at top right, rgba(41,182,255,.22), transparent 34%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}

.not-found-card {
    text-align: center;
    max-width: 760px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 46px 28px;
    box-shadow: var(--shadow);
}

.error-code {
    display: inline-block;
    font-size: clamp(70px, 13vw, 150px);
    line-height: .9;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.not-found h1 {
    margin-top: 16px;
}

.hero-buttons.center {
    justify-content: center;
}

.mini-search {
    margin-top: 26px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.04);
}

.mini-search a {
    color: var(--primary);
    font-weight: 800;
}


.developer-profile {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 26px;
    align-items: center;
}

.developer-photo {
    width: 170px;
    height: 170px;
    border-radius: 38px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    box-shadow: var(--shadow);
    font-size: 72px;
    font-weight: 900;
}

.developer-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.developer-mini {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.developer-mini img,
.developer-mini span {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    flex: 0 0 auto;
}

.developer-mini img {
    object-fit: cover;
}

.developer-mini span {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    color: #fff;
    font-weight: 900;
}

@media (max-width: 850px) {
    .developer-profile {
        grid-template-columns: 1fr;
    }
}


.custom-page {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.custom-page h1,
.custom-page h2,
.custom-page h3 {
    margin-top: 22px;
    margin-bottom: 10px;
}

.custom-page p {
    margin-bottom: 14px;
}


/* Final responsive and theme refinements */
.btn.secondary {
    color: var(--text);
}

.two-col {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
}

.two-col > * {
    min-width: 0;
}

.info-list {
    display: grid;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.info-list div {
    width: 100%;
    overflow-wrap: anywhere;
}

.developer-profile.no-photo {
    grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 850px) {
    .two-col {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .info-list {
        width: 100%;
    }
}
