:root {
    --bg: #f6f8fc;
    --panel: #ffffff;
    --panel-soft: #eef3fd;
    --line: #dbe5f0;
    --text: #1f1f1f;
    --muted: #5f6368;
    --blue: #0b57d0;
    --blue-soft: #d3e3fd;
    --shadow: 0 16px 40px rgba(16, 24, 40, 0.08);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: 1fr auto;
}

.sidebar {
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    grid-row: 1 / 3;
}

.brand-lockup { display: flex; gap: 14px; align-items: center; margin-bottom: 24px; }
.brand-icon {
    width: 52px; height: 52px; border-radius: 16px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #0b57d0, #7baaf7);
    color: #fff; font-weight: 800; font-size: 1.35rem;
}
.brand-title { font-size: 1.15rem; font-weight: 800; }
.brand-subtitle { font-size: 0.85rem; color: var(--muted); }
.side-menu { display: grid; gap: 8px; margin-bottom: 24px; }
.side-menu a {
    padding: 14px 16px; border-radius: 999px; color: #3c4043; font-weight: 600;
}
.side-menu a.active, .side-menu a:hover { background: var(--blue-soft); color: #063b94; }
.sidebar-card, .profile-card {
    background: var(--panel-soft); border: 1px solid #d9e2f2; border-radius: 20px; padding: 16px;
}
.sidebar-card-title { font-weight: 700; margin-bottom: 8px; }
.profile-card { display: flex; gap: 12px; align-items: center; margin-top: 18px; }
.profile-card span { display: block; font-size: 0.85rem; color: var(--muted); }
.profile-badge {
    width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
    background: #0b57d0; color: #fff; font-weight: 700;
}

.main-content {
    padding: 28px;
    min-width: 0;
}
.page-card {
    background: var(--panel); border-radius: var(--radius-xl); box-shadow: var(--shadow);
    border: 1px solid rgba(221, 229, 236, 0.85); padding: 28px;
}
.page-hero { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 24px; align-items: start; }
.hero-surface {
    border-radius: var(--radius-xl);
    padding: 32px;
    background: linear-gradient(135deg, #ffffff 0%, #eaf2ff 100%);
    border: 1px solid #dae7fb;
}
.hero-kicker {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
    background: #fff; border: 1px solid #d9e6fb; border-radius: 999px; color: #335;
    font-size: 0.9rem; font-weight: 700; margin-bottom: 18px;
}
.hero-surface h1 { font-size: 2.5rem; line-height: 1.08; margin: 0 0 14px; }
.hero-surface p { color: var(--muted); font-size: 1rem; line-height: 1.7; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.feature-card {
    background: rgba(255,255,255,0.8); border: 1px solid #d9e5f3; padding: 16px;
    border-radius: 18px;
}
.feature-card h3 { margin: 0 0 8px; font-size: 1rem; }
.feature-card p { margin: 0; font-size: 0.92rem; }
.login-panel {
    background: #fff; border-radius: var(--radius-xl); padding: 26px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.panel-title { font-size: 1.35rem; font-weight: 800; margin: 0 0 8px; }
.panel-subtitle { color: var(--muted); margin: 0 0 20px; }
.form-grid { display: grid; gap: 14px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 7px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; border: 1px solid #ccd7e4; background: #fff; border-radius: 14px;
    padding: 14px 15px; outline: none; transition: 0.2s border, 0.2s box-shadow;
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: #0b57d0; box-shadow: 0 0 0 4px rgba(11,87,208,0.1);
}
.btn {
    border: 0; border-radius: 999px; padding: 14px 18px; cursor: pointer; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-primary { background: #0b57d0; color: #fff; }
.btn-primary:hover { background: #0848af; }
.btn-soft { background: var(--blue-soft); color: #063b94; }
.btn-danger { background: #c5221f; color: #fff; }
.btn-muted { background: #eef3fd; color: #35404f; }
.form-note, .muted { color: var(--muted); font-size: 0.92rem; }
.alert {
    padding: 14px 16px; border-radius: 16px; margin-bottom: 16px; font-weight: 600;
}
.alert-error { background: #fde8e7; color: #8b1e1c; border: 1px solid #f7c7c4; }
.alert-success { background: #e7f5ec; color: #146c43; border: 1px solid #c4ead1; }

.topbar {
    display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px;
}
.topbar h1 { margin: 0; font-size: 2rem; }
.topbar p { margin: 6px 0 0; color: var(--muted); }
.category-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.pill {
    padding: 10px 14px; border-radius: 999px; background: #fff; border: 1px solid #d6e2f0; font-weight: 600;
}
.mod-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.mod-card {
    background: #fff; border: 1px solid #dde6f3; border-radius: 24px; padding: 20px; box-shadow: var(--shadow);
}
.mod-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tag {
    display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px; background: #eef3fd; color: #073c98; font-size: 0.86rem; font-weight: 700;
}
.mod-card h3 { margin: 4px 0 10px; font-size: 1.25rem; }
.mod-card p { color: var(--muted); line-height: 1.6; }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.modal {
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); display: none;
    align-items: center; justify-content: center; padding: 20px; z-index: 1000;
}
.modal.active { display: flex; }
.modal-box {
    width: min(980px, 100%); max-height: 88vh; overflow: auto; background: #fff;
    border-radius: 28px; padding: 26px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}
.modal-head {
    display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 16px;
}
.close-modal {
    width: 44px; height: 44px; border-radius: 50%; border: 0; background: #eef3fd; cursor: pointer; font-size: 1.2rem;
}
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.gallery-grid img { height: 220px; width: 100%; object-fit: cover; border-radius: 18px; border: 1px solid #d8e3f0; }
.divider { height: 1px; background: #dce6f2; margin: 22px 0; }
.version-list { display: grid; gap: 12px; }
.version-item {
    padding: 16px; border: 1px solid #dce7f3; border-radius: 18px; background: #fafcff;
    display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.register-shell { max-width: 760px; margin: 0 auto; }
.empty-state {
    padding: 36px; border-radius: 24px; border: 2px dashed #d4dfed; background: #fff; text-align: center; color: var(--muted);
}

@media (max-width: 1100px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--line); }
    .page-hero, .mod-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .main-content { padding: 16px; }
    .page-card, .hero-surface, .login-panel, .modal-box { padding: 20px; }
    .feature-grid, .gallery-grid { grid-template-columns: 1fr; }
    .topbar { flex-direction: column; align-items: start; }
    .version-item { flex-direction: column; align-items: start; }
}


/* Footer Enhancement */

.site-footer{
    grid-column: 2;
    margin-top: 0;
    background: #f1f3f4;
    border-top: 1px solid #dadce0;
    padding: 18px 30px;
}

.footer-inner{
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-left{
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-brand{
    font-size: 18px;
    font-weight: 700;
    color: #202124;
}

.footer-copy{
    font-size: 13px;
    color: #5f6368;
}

.footer-links{
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links a{
    text-decoration: none;
    color: #1a73e8;
    font-size: 14px;
    font-weight: 500;
}

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

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }

    .sidebar {
        height: auto;
        position: static;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        grid-row: auto;
    }

    .main-content,
    .site-footer {
        grid-column: 1;
    }

    .page-hero,
    .mod-grid {
        grid-template-columns: 1fr;
    }
}

.modal {
    opacity: 0;
    transition: opacity 0.18s ease;
}

.modal.active {
    opacity: 1;
}

.modal-box {
    transform: scale(0.96);
    transition: transform 0.18s ease;
}

.modal.active .modal-box {
    transform: scale(1);
}