:root {
    --sidebar-width: 300px;
    --bg-color: #151a30;
    --nav-bg: #1d1d31;
    --text-main: #ffffff;
    --text-muted: #cccccc;
    --accent-orange: #ff5722;
    --border-color: #231531;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
}

body.light-theme {
    --bg-color: #f1f1f1;
    --nav-bg: #ffffff;
    --text-main: #000000;
    --text-muted: #555555;
    --border-color: #d5d5d5;
}

body.midnight-theme {
    --bg-color: #080d20;
    --nav-bg: #10152b;
    --text-main: #ffffff;
    --text-muted: #cccccc;
    --border-color: #252d55;
}

body.reduce-motion * {
    transition: none !important;
    animation: none !important;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--nav-bg);
    padding: 12px 40px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
}

.nav-left {
    gap: 30px;
}

.nav-right {
    gap: 25px;
}

.logo-banner {
    height: 56px;
    max-width: 230px;
    object-fit: contain;
}

.search-bar {
    background: #f5f5f5;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    padding: 6px 14px;
    color: #000;
    width: 240px;
    font-size: 13px;
    outline: none;
}

.nav-link,
.login-text {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
}

.nav-link:hover,
.login-text:hover {
    color: var(--accent-orange);
}

.nav-icon-small {
    width: 17px;
    height: 17px;
    object-fit: contain;
}

.nav-notifications {
    width: 23px;
    height: 23px;
    object-fit: contain;
}

.light-theme .nav-icon-small,
.light-theme .nav-notifications,
.light-theme .btn-img,
.light-theme .logo-banner {
    filter: brightness(0) saturate(100%);
}

body.navbar-left .navbar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 22px 18px;
    flex-direction: column;
    justify-content: flex-start;
    gap: 18px;
    border: 0;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

body.navbar-left .nav-left,
body.navbar-left .nav-right {
    width: 100%;
    flex-direction: column;
}

body.navbar-left .nav-left {
    align-items: center;
    gap: 15px;
}

body.navbar-left .nav-right {
    position: relative;
    flex: 1;
    min-height: 0;
    align-items: stretch;
    gap: 4px;
    padding-top: 34px;
}

body.navbar-left .logo-banner {
    display: block;
    width: 100%;
    max-width: 260px;
    height: auto;
    max-height: 72px;
    object-fit: contain;
}

body.navbar-left .search-container,
body.navbar-left .search-bar {
    width: 100%;
}

body.navbar-left .nav-link {
    width: 100%;
    min-height: 38px;
    padding: 7px 10px;
    justify-content: flex-start;
    border-radius: 7px;
    font-size: 11px;
}

body.navbar-left .nav-icon-small {
    width: 18px;
    height: 18px;
}

body.navbar-left .notification-link {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    min-height: 0;
    padding: 0;
}

body.navbar-left .login-text {
    width: 100%;
    margin-top: auto;
    padding: 9px 10px;
    border-radius: 7px;
}

.hero {
    position: relative;
    height: 400px;
    background: url('../Icons/Banner.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    color: #fff;
    font-size: 2.7rem;
    margin-bottom: 25px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 480px;
    max-width: 90vw;
    margin: 0 auto;
}

.hero-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    background: rgba(31, 32, 53, .855);
    color: #fff;
}

.btn-img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.main-content {
    max-width: 1100px;
    margin: 45px auto;
    padding: 0 20px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.feature-card {
    background: #383636;
    border-radius: 4px;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 135px;
    object-fit: cover;
}

.card-body {
    padding: 12px 8px;
}

.card-body h3,
.card-body p {
    color: #fff;
}

.card-body h3 {
    font-size: .85rem;
    margin-bottom: 6px;
}

.card-body p {
    font-size: .8rem;
    line-height: 1.45;
}

.light-theme .feature-card {
    background: #fff;
}

.light-theme .card-body h3,
.light-theme .card-body p {
    color: #000;
}

.feed-heading {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 35px;
}

.feed-heading h2 {
    color: var(--text-main);
    font-size: 1.2rem;
}

.footer {
    text-align: center;
    padding: 25px;
    color: var(--text-muted);
    font-size: .8rem;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.settings-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 330px;
    max-width: 90vw;
    height: 100vh;
    padding: 25px;
    background: var(--nav-bg);
    color: var(--text-main);
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 1300;
    box-shadow: -8px 0 25px rgba(0, 0, 0, .3);
}

.settings-panel.open {
    transform: translateX(0);
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.settings-header h2,
.settings-section,
.setting-row {
    color: var(--text-main);
}

.settings-header h2 {
    color: var(--text-main);
}

.close-settings {
    border: 0;
    background: transparent;
    color: var(--text-main);
    font-size: 2rem;
    cursor: pointer;
}

.settings-section {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
}

.settings-section h3 {
    color: var(--accent-orange);
    font-size: .9rem;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 16px 0;
    font-size: .9rem;
}

.setting-row select {
    padding: 6px;
    border-radius: 4px;
}

.setting-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-orange);
}

.settings-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    z-index: 1250;
}

.settings-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

.compact-navigation .nav-right {
    gap: 6px;
}

body.navbar-left.compact-navigation .nav-link {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 10px;
}

.info-page,
.policy-page,
.coming-soon-page {
    color: var(--text-main);
}

body.navbar-left .hero,
body.navbar-left .main-content,
body.navbar-left .footer {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    margin-right: 0;
}

body.navbar-left .hero {
    max-width: none;
}

body.navbar-left .main-content {
    max-width: none;
    padding: 0 70px;
}

body.navbar-left .cards-grid,
body.navbar-left .feed-heading {
    width: min(1100px, 100%);
    margin-left: auto;
    margin-right: auto;
}

body.navbar-left .info-page,
body.navbar-left .policy-page,
body.navbar-left .coming-soon-page {
    width: min(900px, calc(100% - var(--sidebar-width) - 80px));
    max-width: 900px;
    margin-top: 50px;
    margin-left: max(
        calc(var(--sidebar-width) + 40px),
        calc((100% + var(--sidebar-width) - 900px) / 2)
    );
    margin-right: 40px;
}

@media (max-width: 900px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    body.navbar-left .main-content {
        padding-left: 45px;
        padding-right: 45px;
    }
}

@media (max-width: 650px) {
    body.navbar-left .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(300px, 86vw);
        height: 100vh;
        transform: translateX(-100%);
        transition: transform .3s ease;
        padding: 22px 18px;
        z-index: 1150;
    }

    body.navbar-left.mobile-sidebar-open .navbar {
        transform: translateX(0);
    }

    body.navbar-left .nav-left,
    body.navbar-left .nav-right {
        width: 100%;
    }

    body.navbar-left .hero,
    body.navbar-left .main-content,
    body.navbar-left .footer,
    body.navbar-left .info-page,
    body.navbar-left .policy-page,
    body.navbar-left .coming-soon-page {
        width: auto;
        max-width: none;
        margin: 25px 15px;
    }

    body.navbar-left .main-content {
        padding-left: 0;
        padding-right: 0;
    }

    body.navbar-left .hero {
        height: 320px;
    }

    .hero-buttons {
        width: 90vw;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }
}