/* Keep your existing styles - same as before */
:root {
    --bg: #0b0e1a;
    --bg-dark: #060812;
    --accent: #00ff9d;
    --accent2: #00d4ff;
    --accent3: #7c9eff;
    --text: #e0f0ff;
    --text-dim: #a3bffa;
    --card: rgba(20, 25, 45, 0.65);
    --glow: 0 0 20px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(145deg, var(--bg-dark) 0%, var(--bg) 100%);
    color: var(--text);
    min-height: 100dvh;
    overflow-x: hidden;
}

/* Navigation - keep your existing styles */
.navbar-desktop {
    position: fixed;
    inset: 0 0 auto 0;
    padding: 0.9rem 5vw;
    background: rgba(8, 12, 30, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 255, 157, 0.16);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 1024px) {
    .navbar-desktop {
        display: none;
    }
}

.logo {
    font-family: 'Orbitron', monospace;
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    font-weight: 800;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: clamp(1rem, 3vw, 1.8rem);
    align-items: center;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    font-size: clamp(0.8rem, 3vw, 0.95rem);
    transition: all 0.22s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    text-shadow: 0 0 12px var(--accent);
}

.btn-small {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: #0b1121 !important;
    padding: 0.4rem 1rem;
    border-radius: 50vmax;
    font-weight: 700;
}

/* Sidebar */
.sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background: var(--card);
    border: 1px solid var(--accent2);
    color: var(--accent2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

@media (max-width: 1024px) {
    .sidebar-toggle {
        display: flex;
    }
}

.admin-sidebar {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    transform: translateX(-120%);
    opacity: 0;
    width: 260px;
    background: rgba(8, 12, 24, 0.98);
    backdrop-filter: blur(16px);
    border: 1px solid var(--accent2);
    border-radius: 2rem;
    padding: 1.5rem 0.8rem;
    transition: transform 0.3s, opacity 0.2s;
    z-index: 2000;
}

@media (max-width: 1024px) {
    .admin-sidebar {
        display: block;
    }
}

.admin-sidebar.open {
    transform: translateX(0);
    opacity: 1;
}

.sidebar-logo {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--accent2), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding: 0 0.5rem 1.2rem;
    border-bottom: 1px solid var(--accent2);
    margin-bottom: 1.2rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 2rem;
}

.sidebar-nav a i {
    width: 1.5rem;
    color: var(--accent2);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent2);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 255, 157, 0.1);
    margin-top: 1.5rem;
}

.sidebar-footer .signup-link {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: #0b1121;
    padding: 0.7rem 1rem;
    border-radius: 2rem;
    text-align: center;
    display: block;
    font-weight: 700;
    text-decoration: none;
}

.sidebar-footer .logout-link {
    background: linear-gradient(90deg, rgba(225, 62, 62, 0.81), red);
    color: white;
    padding: 0.7rem 1rem;
    border-radius: 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    text-decoration: none;
    margin-top: 0.5rem;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 1025px) {
    .main-container {
        padding-top: 80px;
    }
}

@media (max-width: 1024px) {
    .main-container {
        padding-top: 0.5rem;
    }
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    text-decoration: none;
    margin: 1rem 0;
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .back-home {
        margin-left: 3.5rem;
    }
}

.back-home:hover {
    color: var(--accent);
    transform: translateX(-5px);
}

/* Game Header */
.game-header {
    text-align: center;
    padding: 1rem;
}

.game-header h1 {
    font-family: 'Orbitron', monospace;
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    font-weight: 900;
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Game Stats */
.game-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 1rem auto;
    padding: 1rem;
    background: var(--card);
    border-radius: 2rem;
    border: 1px solid rgba(0, 255, 157, 0.2);
    max-width: 900px;
}

.stat-box {
    text-align: center;
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Game Canvas */
.game-container {
    position: relative;
    margin: 1rem auto;
    display: flex;
    justify-content: center;
}

canvas {
    background: var(--card);
    border-radius: 1.5rem;
    border: 2px solid rgba(0, 255, 157, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem auto;
    padding: 0.5rem;
    background: var(--card);
    border-radius: 2rem;
    max-width: 400px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.3);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background: rgba(0, 255, 157, 0.2);
    transform: scale(1.05);
}

.speed-indicator {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    font-family: 'Orbitron', monospace;
    z-index: 100;
    display: none;
}

.speed-indicator.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.combo-meter {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: bold;
    font-size: 1rem;
    z-index: 100;
    display: none;
    white-space: nowrap;
}

.combo-meter.show {
    display: block;
    animation: comboPop 0.3s ease;
}

@keyframes comboPop {
    0% {
        transform: translateX(-50%) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

.leaderboard-section {
    background: var(--card);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 800px;
    border: 1px solid rgba(0, 255, 157, 0.2);
}

.runner-rank-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.runner-rank-number {
    font-family: 'Orbitron', monospace;
    width: 40px;
    font-weight: bold;
    color: var(--accent);
}

.runner-rank-flag {
    font-size: 1.2rem;
    width: 30px;
}

.runner-rank-name {
    flex: 1;
}

.runner-rank-score {
    font-family: 'Orbitron', monospace;
    color: var(--accent2);
    font-weight: bold;
}

.runner-rank-stats {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-left: 0.5rem;
}

.game-over-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #1a1f35, #0b0e1a);
    border-radius: 2rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    border: 1px solid var(--accent);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: bold;
    cursor: pointer;
    border: none;
}

.modal-btn-primary {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: #0b1121;
}

.modal-btn-secondary {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

/* Footer */
footer {
    padding: 2rem 5vw 1.5rem;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    color: var(--text-dim);
    border-top: 1px solid rgba(0, 255, 157, 0.1);
    font-size: 0.8rem;
    margin-top: 2rem;
    width: 100%;
    padding-bottom: calc(1.5rem + var(--safe-bottom));
}

.footer-developer {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    color: #8ab4ff;
}

footer a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
}

footer a:hover {
    color: var(--accent);
}

@media (max-width: 930px) {
    footer {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 0.8rem;
    }
}


body.sidebar-open {
    overflow: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.2);
        display: none;
    }
}

@keyframes jumpEffect {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0);
    }
}

.jump-animation {
    animation: jumpEffect 0.2s ease;
}

/* Footer */
footer {
    padding: 2rem 5vw 1.5rem;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    color: var(--text-dim);
    border-top: 1px solid rgba(0, 255, 157, 0.1);
    font-size: 0.8rem;
    margin-top: 2rem;
    width: 100%;
    padding-bottom: calc(1.5rem + var(--safe-bottom));
}

.footer-developer {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    color: #8ab4ff;
}

footer a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
}

footer a:hover {
    color: var(--accent);
}

@media (max-width: 930px) {
    footer {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 0.8rem;
    }
}


/* ============================================
   BRICK RUNNER - RESPONSIVE STYLES
   ============================================ */

/* Base responsive settings */
@media (max-width: 1024px) {
    .main-container {
        padding: 0 0.5rem;
    }

    .game-stats {
        gap: 1rem;
        padding: 0.8rem;
        max-width: 95%;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    canvas {
        width: 100% !important;
        height: auto !important;
    }

    .game-container {
        width: 100%;
        padding: 0;
    }

    .controls {
        gap: 1rem;
        max-width: 90%;
        flex-wrap: wrap;
    }

    .control-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }

    .speed-indicator {
        top: 70px;
        right: 10px;
        font-size: 0.6rem;
        padding: 0.2rem 0.6rem;
    }

    .combo-meter {
        bottom: 80px;
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .leaderboard-section {
        margin: 1rem auto;
        padding: 1rem;
        max-width: 95%;
    }

    .runner-rank-item {
        gap: 0.8rem;
        padding: 0.6rem;
    }

    .runner-rank-number {
        width: 35px;
        font-size: 0.8rem;
    }

    .runner-rank-flag {
        font-size: 1rem;
        width: 25px;
    }

    .runner-rank-name {
        font-size: 0.85rem;
    }

    .runner-rank-score {
        font-size: 0.85rem;
    }

    .runner-rank-stats {
        font-size: 0.65rem;
    }
}

/* Tablet styles (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .game-header h1 {
        font-size: 2rem;
    }

    .game-stats {
        gap: 1.5rem;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    canvas {
        width: 90% !important;
        max-width: 700px;
    }
}

/* Mobile landscape (480px - 768px) */
@media (min-width: 480px) and (max-width: 768px) {
    .game-header h1 {
        font-size: 1.8rem;
    }

    .game-header p {
        font-size: 0.85rem;
    }

    .game-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        max-width: 90%;
    }

    .stat-box {
        padding: 0.3rem;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.55rem;
    }

    .controls {
        gap: 0.8rem;
        padding: 0.4rem;
    }

    .control-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.65rem;
    }

    .control-btn i {
        font-size: 0.8rem;
    }

    .speed-indicator {
        top: 65px;
        right: 8px;
        font-size: 0.55rem;
        padding: 0.2rem 0.5rem;
    }

    .combo-meter {
        bottom: 70px;
        padding: 0.35rem 0.8rem;
        font-size: 0.7rem;
    }

    .runner-rank-item {
        gap: 0.6rem;
        padding: 0.5rem;
    }

    .runner-rank-number {
        width: 30px;
        font-size: 0.75rem;
    }

    .runner-rank-flag {
        font-size: 0.9rem;
        width: 22px;
    }

    .runner-rank-name {
        font-size: 0.8rem;
    }

    .runner-rank-score {
        font-size: 0.8rem;
    }

    .runner-rank-stats {
        font-size: 0.6rem;
    }
}

/* Mobile portrait (320px - 480px) */
@media (min-width: 320px) and (max-width: 480px) {
    .main-container {
        padding: 0 0.3rem;
    }

    .back-home {
        margin-left: 2.5rem;
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }

    .game-header {
        padding: 0.5rem;
    }

    .game-header h1 {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .game-header p {
        font-size: 0.75rem;
        padding: 0 0.5rem;
    }

    .game-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
        padding: 0.6rem;
        max-width: 95%;
        margin: 0.5rem auto;
    }

    .stat-box {
        padding: 0.25rem;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.5rem;
        letter-spacing: 0.5px;
    }

    .game-container {
        margin: 0.5rem auto;
    }

    canvas {
        width: 100% !important;
        height: auto !important;
        min-height: 300px;
        border-radius: 1rem;
    }

    .controls {
        gap: 0.6rem;
        padding: 0.4rem;
        max-width: 95%;
        margin: 0.5rem auto;
    }

    .control-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.6rem;
    }

    .control-btn i {
        font-size: 0.7rem;
    }

    .speed-indicator {
        top: 60px;
        right: 5px;
        font-size: 0.5rem;
        padding: 0.15rem 0.4rem;
    }

    .combo-meter {
        bottom: 65px;
        padding: 0.3rem 0.7rem;
        font-size: 0.65rem;
        white-space: nowrap;
    }

    .leaderboard-section {
        margin: 1rem auto;
        padding: 0.8rem;
        border-radius: 1rem;
    }

    .leaderboard-section h3 {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }

    .runner-rank-item {
        display: grid;
        grid-template-columns: auto auto 1fr auto auto;
        grid-template-rows: auto auto;
        gap: 0.3rem;
        padding: 0.5rem 0.3rem;
        align-items: center;
    }

    /* Rank number */
    .runner-rank-number {
        grid-row: 1 / 2;
        grid-column: 1 / 2;
        width: 28px;
        font-size: 0.7rem;
    }

    /* Flag */
    .runner-rank-flag {
        grid-row: 1 / 2;
        grid-column: 2 / 3;
        width: 20px;
        font-size: 0.85rem;
        justify-self: start;
    }

    /* Name */
    .runner-rank-name {
        grid-row: 2 / 3;
        grid-column: 1 / 4;
        font-size: 0.7rem;
        white-space: normal;
        word-break: break-word;
        margin-top: 0.2rem;
        padding-left: 0;
    }

    /* Score */
    .runner-rank-score {
        grid-row: 1 / 2;
        grid-column: 3 / 4;
        font-size: 0.75rem;
        justify-self: end;
    }

    /* Stats */
    .runner-rank-stats {
        grid-row: 2 / 3;
        grid-column: 4 / 6;
        font-size: 0.55rem;
        margin-left: 0;
        justify-self: end;
        align-self: start;
        white-space: nowrap;
    }

    /* Modal adjustments */
    .modal-content {
        padding: 1.2rem;
        width: 95%;
    }

    .modal-content h2 {
        font-size: 1.3rem;
    }

    .stats-grid {
        gap: 0.6rem !important;
    }

    .stat-item .stat-label {
        font-size: 0.55rem;
    }

    .stat-item .stat-value {
        font-size: 1rem;
    }

    .modal-buttons {
        gap: 0.8rem;
    }

    .modal-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    footer {
        font-size: 0.65rem;
        padding: 1rem 1rem 1.5rem;
        gap: 0.5rem;
    }

    .footer-developer {
        font-size: 0.7rem;
    }
}

/* Very small phones (below 320px) */
@media (max-width: 320px) {
    .main-container {
        padding: 0 0.2rem;
    }

    .back-home {
        margin-left: 2rem;
        font-size: 0.7rem;
    }

    .game-header h1 {
        font-size: 1.2rem;
    }

    .game-header p {
        font-size: 0.65rem;
    }

    .game-stats {
        gap: 0.4rem;
        padding: 0.4rem;
    }

    .stat-value {
        font-size: 0.9rem;
    }

    .stat-label {
        font-size: 0.45rem;
    }

    .control-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.55rem;
    }

    .control-btn i {
        font-size: 0.6rem;
    }

    .speed-indicator {
        top: 55px;
        font-size: 0.45rem;
        padding: 0.12rem 0.35rem;
    }

    .combo-meter {
        bottom: 60px;
        padding: 0.25rem 0.6rem;
        font-size: 0.6rem;
    }

    .runner-rank-item {
        gap: 0.2rem;
    }

    .runner-rank-number {
        width: 24px;
        font-size: 0.65rem;
    }

    .runner-rank-flag {
        width: 18px;
        font-size: 0.75rem;
    }

    .runner-rank-name {
        font-size: 0.65rem;
    }

    .runner-rank-score {
        font-size: 0.7rem;
    }

    .runner-rank-stats {
        font-size: 0.5rem;
        white-space: normal;
        text-align: right;
    }

    /* Hide time stats on very small screens if needed */
    .runner-rank-stats {
        max-width: 60px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Landscape orientation for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .game-header {
        padding: 0.2rem;
    }

    .game-header h1 {
        font-size: 1.2rem;
    }

    .game-stats {
        gap: 0.8rem;
        padding: 0.4rem;
        max-width: 80%;
    }

    canvas {
        min-height: 250px;
        max-height: 300px;
    }

    .controls {
        margin: 0.3rem auto;
    }

    .leaderboard-section {
        margin: 0.8rem auto;
    }

    .combo-meter {
        bottom: 50px;
    }
}

/* Touch-friendly button areas */
@media (max-width: 768px) {
    .control-btn {
        min-height: 40px;
        min-width: 70px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    canvas {
        touch-action: none;
        cursor: pointer;
    }

    /* Improve tap targets */
    .control-btn,
    .sidebar-toggle,
    .modal-btn {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .control-btn:active,
    .modal-btn:active {
        transform: scale(0.95);
        transition: transform 0.05s;
    }
}

/* Adjust canvas container for better visibility */
@media (max-width: 768px) {
    .game-container {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    canvas {
        width: 100%;
        height: auto;
        max-width: 100%;
        object-fit: contain;
    }
}

/* Ensure text remains readable */
@media (max-width: 480px) {
    .runner-rank-name {
        white-space: normal;
        word-break: break-word;
        max-width: 120px;
    }

    .leaderboard-section h3 {
        font-size: 0.85rem;
        text-align: center;
    }
}

/* Animation adjustments for mobile performance */
@media (max-width: 768px) {

    .combo-meter.show,
    .speed-indicator.show {
        animation-duration: 0.2s;
    }

    .hit-animation,
    .jump-animation {
        animation-duration: 0.15s;
    }
}

/* Safe area insets for notched phones */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .main-container {
            padding-left: max(0.5rem, env(safe-area-inset-left));
            padding-right: max(0.5rem, env(safe-area-inset-right));
            padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
        }

        .sidebar-toggle {
            top: max(1rem, env(safe-area-inset-top));
            left: max(1rem, env(safe-area-inset-left));
        }

        .back-home {
            margin-left: max(3rem, env(safe-area-inset-left) + 2rem);
        }
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b0e1a;
        --bg-dark: #060812;
    }
}