#left-color-bar { position: fixed; top: 0; left: 0; bottom: 0; width: 4px; background: var(--gradient-primary); z-index: 200; box-shadow: 2px 0 15px rgba(59, 130, 246, 0.5); }
nav { padding: calc(20px + env(safe-area-inset-top)) 40px 20px 40px; display: flex; justify-content: space-between; align-items: center; background: rgba(15, 23, 42, 0.3); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-glass); position: sticky; top: 0; z-index: 100; width: 100%; box-sizing: border-box; }
.logo-container { display: flex; align-items: center; gap: 12px; cursor: pointer; text-decoration: none; }
.logo-text { font-size: 1.6rem; font-weight: 800; background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; user-select: none; }
.nav-actions { display: flex; gap: 15px; align-items: center; }
.app-wrapper { display: flex; gap: 30px; max-width: 1500px; margin: 0 auto; padding: 30px 20px; width: 100%; align-items: flex-start; flex: 1; transition: opacity 0.3s ease; box-sizing: border-box; }
.workspace { flex: 1; min-width: 0; position: relative; width: 100%; }
.layout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.tab-pane { position: absolute; visibility: hidden; opacity: 0; transition: opacity 0.3s ease; z-index: -1; width: 100%; }
.tab-pane.active { position: relative; visibility: visible; opacity: 1; z-index: 1; }
.bento-box { display: grid; grid-template-columns: 3fr 2fr; gap: 25px; align-items: start; }
.icon-btn { background: transparent; border: none; color: var(--text-main); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.hamburger-menu { position: fixed; inset: 0; background: rgba(5, 7, 10, 0.9); z-index: 1000; display: flex; transition: opacity 0.3s ease, visibility 0.3s; opacity: 1; visibility: visible; }
.hamburger-menu.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.menu-content { width: 300px; max-width: 80%; background: var(--surface-glass); height: 100%; padding: 20px; box-shadow: 2px 0 15px rgba(0,0,0,0.5); transform: translateX(0); transition: transform 0.3s ease; display: flex; flex-direction: column; gap: 20px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-right: 1px solid var(--border-glass); }
.hamburger-menu.hidden .menu-content { transform: translateX(-100%); }
.nav-menu-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; }
.menu-link { background: transparent; border: none; color: var(--text-muted); font-size: 1.2rem; font-weight: 600; cursor: pointer; text-align: left; padding: 12px 16px; border-radius: 8px; transition: 0.2s; width: 100%; min-height: 48px; }
.menu-link:hover { color: var(--text-main); background: rgba(255,255,255,0.05); }
.menu-link.active { color: #38bdf8; background: rgba(56, 189, 248, 0.1); }
.modal-overlay { position: fixed; inset: 0; background: rgba(5, 7, 10, 0.8); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); z-index: 1000; display: flex; align-items: center; justify-content: center; transition: opacity 0.3s ease, visibility 0.3s; opacity: 1; visibility: visible; overflow-y: auto; padding: 20px; box-sizing: border-box; }
.modal-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.modal-content { position: relative; max-width: 500px; width: 100%; max-height: calc(100vh - 40px); overflow-y: auto; box-sizing: border-box; }
.close-btn { position: absolute; top: 15px; right: 15px; font-size: 2rem; color: var(--text-muted); z-index: 10; min-height: 48px; min-width: 48px; }
.close-btn:hover { color: var(--text-main); }

.view-toggle { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.view-toggle::-webkit-scrollbar { display: none; }
.view-toggle button { flex-shrink: 0; white-space: nowrap; }

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto; 
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glass);
    z-index: 900;
    padding: 10px 15px calc(10px + env(safe-area-inset-bottom));
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.bottom-nav-link {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    flex: 1;
    min-height: 48px;
    justify-content: center;
}

.bottom-nav-link.active {
    color: #38bdf8;
}

@media (max-width: 1200px) { .bento-box { grid-template-columns: 1fr; } }
@media (max-width: 1024px) { .app-wrapper { flex-direction: column; } .layout-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    html, body { padding-left: 0; padding-top: 4px; width: 100vw; overflow-x: hidden; box-sizing: border-box; }
    #left-color-bar { width: 100%; height: 4px; bottom: auto; }
    nav { padding: calc(15px + env(safe-area-inset-top)) 15px 15px 15px; flex-wrap: wrap; justify-content: space-between; gap: 15px; }
    #hamburgerBtn { display: none !important; }
    .bottom-nav { display: flex; }
    .nav-actions { justify-content: center; flex-wrap: wrap; gap: 15px; }
    .app-wrapper { padding: 10px 0 80px 0; }
    .workspace { padding: 0; }
    .bento-box { grid-template-columns: 1fr !important; }
    .layout-grid { grid-template-columns: 1fr !important; }
    .menu-content { width: 100%; max-width: 100%; border-right: none; }
    .modal-overlay { padding: 0; }
    .modal-content { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; overflow-x: hidden; box-sizing: border-box; border-radius: 0; display: flex; flex-direction: column; }
    .close-btn { top: calc(15px + env(safe-area-inset-top)); right: 15px; }
}