/* ===== layout.css - Header, Nav, Splash & Structure ===== */

/* SPLASH SCREEN */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-logo {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease infinite;
}

.splash-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

/* SCREENS STRUCTURE */
.screen {
    display: none;
    min-height: 100vh;
    padding-bottom: 75px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.screen.active {
    display: block;
}

.main-content {
    padding: 0.75rem;
    max-width: 500px;
    margin: 0 auto;
}

/* HEADER */
.app-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.header-btn:hover {
    background: rgba(255,255,255,0.3);
}

.user-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* SCREEN HEADER (Internal Pages) */
.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--dark-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.screen-header h2 { font-size: 1.1rem; }

.screen-content {
    padding: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* BOTTOM NAV */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark-light);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.5;
    border-radius: var(--radius-md);
}

.nav-item.active { opacity: 1; background: rgba(99, 102, 241, 0.2); }
.nav-item:active { transform: scale(0.95); }
.nav-icon { font-size: 1.3rem; }
.nav-label { font-size: 0.65rem; font-weight: 500; }