/**
 * @file layout.css
 * @description Header, screen containers, and layout structure
 *
 * @requires base.css (CSS variables)
 * @usedBy index.php
 *
 * @status COMPLETE
 */

/* ==================== HEADER ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.4s ease;
    gap: 10px;
}

body.dark-mode .header {
    background: rgba(26, 26, 46, 0.95);
    border-bottom-color: rgba(255,255,255,0.05);
}

.logo {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.7;
}

.logo-icon {
    font-size: 1.1rem;
}

/* Header Mode Tabs */
.header-mode-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
    max-width: 300px;
}

.header-mode-tab {
    padding: 6px 14px;
    border: none;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: inherit;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.header-mode-tab:hover {
    opacity: 0.8;
    background: rgba(67, 97, 238, 0.1);
}

.header-mode-tab.active {
    opacity: 1;
    background: var(--primary);
    color: white;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==================== SEARCH BAR ==================== */
.search-container {
    position: relative;
}

.search-input {
    padding: 6px 28px 6px 30px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 20px;
    font-size: 0.8rem;
    width: 150px;
    background: rgba(255,255,255,0.9);
    color: var(--text-light);
    transition: all 0.2s ease;
}

body.dark-mode .search-input {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.1);
    color: var(--text-dark);
}

.search-input:focus {
    outline: none;
    width: 180px;
    border-color: var(--primary);
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 0.8rem;
}

/* Search Status Indicator */
.search-status {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.search-status.found {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.search-status.notfound {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

/* ==================== THEME TOGGLE ==================== */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
}

.switch {
    width: 36px;
    height: 20px;
    background: rgba(0,0,0,0.1);
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

body.dark-mode .switch {
    background: rgba(255,255,255,0.2);
}

.switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--text-light);
    border-radius: 50%;
    transition: transform 0.3s var(--ease-smooth);
}

body.dark-mode .switch::after {
    transform: translateX(16px);
    background: var(--text-dark);
}

/* ==================== SCREEN TRANSITIONS ==================== */
.screen {
    display: none;
    min-height: 100vh;
    padding-top: 70px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.screen.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    animation: screenIn 0.4s ease-out;
}

@keyframes screenIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
