/**
 * MASTER THEMES CSS - Rumahpku
 * Centralized layout systems for mobile-centered web pages.
 */

:root {
    --primary: #0f3d2e;
    --primary-light: #1b5e46;
    --primary-dark: #0a2a1f;
    --accent: #C9A24D;
    --accent-light: #d4b06a;
    --accent-dark: #8b6914;

    --bg-light: #FFFFFF;
    --bg-soft: #f8fafc;
    --surface-light: #F8F9FA;
    
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
}

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

body {
    font-family: 'Poppins', 'Inter', sans-serif;
    background: #f0f0f0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

/* ===== APP LAYOUT ===== */
.app-container {
    position: relative;
    width: 100%;
    max-width: 420px; /* Standard mobile-center width */
    background: var(--bg-light);
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-light);
    padding: 20px 16px 12px;
}

.app-main {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 100px; /* Space for bottom nav */
}

/* Utility for hiding scrollbar */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 12px 24px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item:hover {
    color: var(--primary);
}

.nav-item .material-icons-outlined {
    font-size: 24px;
}

.nav-item span:last-child {
    font-size: 10px;
    font-weight: 500;
}

.nav-item.active span:last-child {
    font-weight: 700;
}

.nav-center {
    position: relative;
    margin-top: -32px;
}

.nav-center-btn {
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(15, 61, 46, 0.4);
    text-decoration: none;
    transition: transform 0.2s;
}

.nav-center-btn:hover {
    transform: scale(1.05);
}

.nav-center-btn .material-icons-outlined {
    font-size: 26px;
}

.nav-center-label {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

/* Safe Area Support */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}
