/* ============================================================
   ZIZZISTUDIO — STYLES.CSS
   ============================================================ */

/* --- 1. FONTS --- */
@font-face {
    font-family: 'ZizziLogo';
    src: url('0_FONTS/LOGO_FONT.woff2') format('woff2'),
         url('0_FONTS/LOGO_FONT.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* --- 2. VARIABLES --- */
:root {
    --bg-dark: #0a0a0a;
    --bg-sidebar: #111111;
    --neon-green: #00FF00;
    --text-main: #e0e0e0;
    --text-muted: #666;
    --side-width: 280px;
    --transition-speed: 0.4s;
    --fluid-type: clamp(1rem, 0.9rem + 0.5vw, 1.1rem);
}

/* --- 3. BASE RESET --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Courier New', monospace;
    font-size: var(--fluid-type);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- 4. SLIDE SIDEBAR & OVERLAY --- */
#sidebar {
    position: fixed;
    top: 0;
    left: calc(var(--side-width) * -1);
    width: var(--side-width);
    height: 100%;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--neon-green);
    transition: left var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3000;
    padding: 40px 25px;
}

#sidebar.expanded { left: 0; }

#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    z-index: 2500;
    backdrop-filter: blur(3px);
}

#overlay.active { display: block; }

.sidebar-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--neon-green);
    font-size: 2rem;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}
.sidebar-close:hover { opacity: 0.7; }

/* sidebar login form */
.sidebar-login {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    margin-top: 2.5rem;
}

.sidebar-login-title {
    color: var(--neon-green);
    font-weight: normal;
    letter-spacing: 1px;
    border-bottom: 1px solid #222;
    padding-bottom: 0.6rem;
}

.sidebar-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-field label {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    
}

.sidebar-input {
    background: transparent;
    border: 1px solid rgba(0, 255, 0, 0.18);
    color: var(--text-main);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    padding: 0.45rem 0.65rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sidebar-input::placeholder { color: #333; }

.sidebar-input:focus {
    border-color: rgba(0, 255, 0, 0.5);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.08);
}

.sidebar-login-btn {
    background: transparent;
    border: 1px solid rgba(0, 255, 0, 0.35);
    color: var(--neon-green);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    letter-spacing: 1px;
    width: 100%;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.sidebar-login-btn:hover {
    background: rgba(0, 255, 0, 0.08);
    border-color: var(--neon-green);
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.15);
}

.sidebar-forgot {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}
.sidebar-forgot:hover { color: var(--neon-green); }

/* sidebar logged-in state */
.sidebar-loggedin {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 2.5rem;
}

.sidebar-loggedin-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid rgba(0,255,0,0.4);
    object-fit: cover;
    background: #111;
}

.sidebar-loggedin-name {
    font-family: 'ZizziLogo', monospace;
    font-size: 1.2rem;
    color: var(--neon-green);
}

.sidebar-loggedin-cp {
    font-size: 0.75rem;
    color: var(--neon-green);
    text-decoration: none;
    letter-spacing: 1px;
    border: 1px solid rgba(0,255,0,0.3);
    padding: 0.4rem 0.8rem;
    display: inline-block;
    text-align: center;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.sidebar-loggedin-cp:hover {
    background: rgba(0,255,0,0.08);
    border-color: var(--neon-green);
    box-shadow: 0 0 10px rgba(0,255,0,0.15);
}

.sidebar-loggedin-logout {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 1px;
    border: 1px solid #222;
    padding: 0.4rem 0.8rem;
    display: inline-block;
    text-align: center;
    transition: color 0.2s, border-color 0.2s;
}
.sidebar-loggedin-logout:hover { color: #ff4444; border-color: #ff4444; }

/* --- 5. HEADER --- */
header {
    width: 100%;
    background: var(--bg-dark);
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
}

.brand-area {
    text-align: center;
    padding: 0.6rem 1rem 0;
}

@media (min-width: 769px) {
    header {
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
        padding-right: 1.5rem;
    }
    .brand-area {
        text-align: right;
        padding: 0.6rem 0 0.4rem;
        flex-shrink: 0;
    }
    .top-nav {
        flex: 1;
        overflow-x: visible;
        white-space: normal;
        flex-wrap: wrap;
    }
}

.brand-name {
    font-family: 'ZizziLogo', 'Courier New', monospace;
    font-size: clamp(2rem, 10vw, 3.2rem);
    display: block;
    line-height: 0.95;
    filter: drop-shadow(0 0 8px rgba(0, 255, 0, 0.4));
    background: linear-gradient(110deg, #00FF00 40%, rgba(255,255,255,0.8) 50%, #00FF00 60%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: zizzi-shimmer 5s linear infinite;
}

.tagline {
    font-size: 0.78rem;
    
    margin-top: 0.15rem;
    display: block;
    letter-spacing: 1px;
    animation: green-pulse 4s ease-in-out infinite;
}

/* --- 6. LOGIN ROW --- */
.login-row {
    width: 100%;
    background: var(--bg-dark);
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    padding: 0.45rem 1.5rem;
}

.login-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .login-row { display: none; }
}

.login-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-right: 0.2rem;
}

.login-input {
    background: transparent;
    border: 1px solid rgba(0, 255, 0, 0.18);
    color: var(--text-main);
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
    width: 90px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input::placeholder { color: #444; }

.login-input:focus {
    border-color: rgba(0, 255, 0, 0.5);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.1);
}

.login-btn {
    background: transparent;
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: var(--neon-green);
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.login-btn:hover {
    background: rgba(0, 255, 0, 0.08);
    border-color: var(--neon-green);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.15);
}

/* logged-in top bar */
.loggedin-bar {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.loggedin-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(0,255,0,0.4);
    object-fit: cover;
    background: #111;
}

.loggedin-name {
    font-size: 0.75rem;
    color: var(--neon-green);
    letter-spacing: 0.5px;
}

.loggedin-logout {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}
.loggedin-logout:hover { color: #ff4444; }

/* login error */
.login-error {
    font-size: 0.7rem;
    color: #ff4444;
    letter-spacing: 0.5px;
    display: none;
}

/* fade transition */
.login-bar, .loggedin-bar, .sidebar-login, .sidebar-loggedin {
    transition: opacity 0.3s;
}

/* --- 7. NAVIGATION --- */
.top-nav {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 0.8rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.top-nav::-webkit-scrollbar { display: none; }

.nav-burger {
    color: var(--neon-green);
    font-size: 1.5rem;
    text-decoration: none;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0.65rem 1rem;
    border: 1px solid rgba(0, 255, 0, 0.25);
    margin-right: 0.4rem;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.nav-burger:hover {
    background: rgba(0, 255, 0, 0.08);
    border-color: var(--neon-green);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.15);
}

.top-nav .nav-sep {
    color: var(--neon-green);
    font-size: 1rem;
    padding: 0 0.1rem;
    user-select: none;
    opacity: 0.8;
    flex-shrink: 0;
}

.top-nav a:not(.nav-burger) {
    color: var(--text-main);
    text-decoration: none;
    
    font-size: 1rem;
    padding: 0.55rem 0.85rem;
    letter-spacing: 0.3px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.top-nav a:not(.nav-burger):hover {
    background: rgba(0, 255, 0, 0.08);
    color: var(--neon-green);
    box-shadow: inset 0 -2px 0 var(--neon-green);
}

/* --- 8. PAGE LAYOUT --- */
.page-layout {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    gap: 0;
}

main {
    padding: 2.5rem 1.2rem 2.5rem 1.5rem;
    flex: 1;
    min-width: 0;
}

/* --- 9. CARDS --- */
.cards-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.cards-label {
    font-size: clamp(1.4rem, 4vw, 1.9rem);
    color: var(--text-main);
    letter-spacing: 2px;
    
    margin-bottom: 0.6rem;
    font-family: 'ZizziLogo', monospace;
}

.post-card {
    background: #111;
    border: 1px solid rgba(0, 255, 0, 0.15);
    padding: 1.4rem 1.6rem;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 0 1.4rem;
    position: relative;
    transition: border-color 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
}

.post-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,255,0,0.03) 0%, transparent 60%);
    pointer-events: none;
}

.post-card:hover {
    border-color: rgba(0, 255, 0, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.06), inset 0 0 30px rgba(0, 255, 0, 0.02);
}

.card-avatar {
    grid-column: 1;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0.2rem;
    gap: 0.6rem;
}

.avatar-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 0, 0.5);
    object-fit: cover;
    background: #0a0a0a;
    display: block;
}

.avatar-line {
    width: 1px;
    flex: 1;
    min-height: 20px;
    background: linear-gradient(to bottom, rgba(0,255,0,0.3), transparent);
}

.card-content { grid-column: 2; min-width: 0; }

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.card-author   { font-size: 0.78rem; color: var(--text-main); font-weight: bold; letter-spacing: 0.5px; }
.card-dot      { color: #333; font-size: 0.7rem; }
.card-category { font-size: 0.68rem; color: var(--neon-green); border: 1px solid rgba(0,255,0,0.2); padding: 0.1rem 0.45rem; background: rgba(0,255,0,0.04); letter-spacing: 0.5px; }
.card-date     { font-size: 0.68rem; color: var(--text-muted); margin-left: auto; }

.card-title {
    font-family: 'ZizziLogo', monospace;
    font-size: clamp(1.3rem, 4vw, 1.7rem);
    color: var(--text-main);
    line-height: 1.15;
    margin-bottom: 0.6rem;
    transition: color 0.2s;
}
.post-card:hover .card-title { color: var(--neon-green); }

.card-excerpt {
    font-size: 0.88rem;
    color: #888;
    line-height: 1.6;
    margin-bottom: 1rem;
    max-width: 60ch;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag-container { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tag-item {
    font-size: 0.65rem;
    color: var(--text-muted);
    border: 1px solid #222;
    padding: 0.2rem 0.5rem;
    background: transparent;
    transition: color 0.2s, border-color 0.2s;
}
.post-card:hover .tag-item { color: rgba(0,255,0,0.6); border-color: rgba(0,255,0,0.2); }

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--neon-green);
    text-decoration: none;
    font-size: 0.78rem;
    letter-spacing: 1px;
    opacity: 0.7;
    transition: opacity 0.2s, text-shadow 0.2s;
    white-space: nowrap;
}
.post-card:hover .read-more { opacity: 1; text-shadow: 0 0 8px rgba(0, 255, 0, 0.5); }

@media (max-width: 520px) {
    .post-card { grid-template-columns: 1fr; padding: 1.2rem; }
    .card-avatar { grid-row: 1; flex-direction: row; align-items: center; gap: 0.8rem; margin-bottom: 0.8rem; }
    .avatar-line { display: none; }
    .card-content { grid-column: 1; }
    .card-date { margin-left: 0; }
}

/* --- 10. RIGHT SIDEBAR --- */
.right-sidebar {
    width: 320px;
    flex-shrink: 0;
    padding: 2.5rem 1.4rem 2.5rem 0;
    display: none;
}

@media (min-width: 1024px) {
    .right-sidebar { display: block; }
    .sidebar-widget { margin-top: 1.7rem; }
}

.right-sidebar-title {
    font-family: 'ZizziLogo', monospace;
    font-size: clamp(1.4rem, 4vw, 1.9rem);
    color: var(--text-main);
    letter-spacing: 2px;
    margin-bottom: 0.6rem;
    font-weight: normal;
    
}

.sidebar-widget {
    background: #111;
    border: 1px solid rgba(0, 255, 0, 0.15);
    padding: 1.3rem 1.4rem;
    position: relative;
}

.sidebar-widget::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,255,0,0.03) 0%, transparent 60%);
    pointer-events: none;
}

/* --- 11. BOTTOM SHEET (mobile) --- */
.bottom-sheet { display: none; }

@media (max-width: 1023px) {
    .bottom-sheet {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 2000;
        background: var(--bg-sidebar);
        border-top: 1px solid rgba(0, 255, 0, 0.2);
        border-radius: 12px 12px 0 0;
        transform: translateY(calc(100% - 36px));
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        max-height: 70vh;
    }
    .bottom-sheet.open { transform: translateY(0); }

    .bottom-sheet-handle {
        width: 40px;
        height: 4px;
        background: rgba(0, 255, 0, 0.3);
        border-radius: 2px;
        margin: 10px auto 6px;
        cursor: pointer;
        transition: background 0.2s;
    }
    .bottom-sheet-handle:hover { background: rgba(0, 255, 0, 0.7); }

    .bottom-sheet-content {
        padding: 0.8rem 1.4rem 2rem;
        overflow-y: auto;
        max-height: calc(70vh - 36px);
    }
}

/* --- 12. FOOTER --- */
footer {
    padding: 2rem 1rem;
    text-align: center;
    border-top: 1px solid rgba(0, 255, 0, 0.1);
    color: #555;
    font-size: 0.75rem;
    margin-top: auto;
}

/* --- 13. ANIMATIONS --- */
@keyframes zizzi-shimmer {
    to { background-position: 200% center; }
}

@keyframes green-pulse {
    0%, 100% { color: #3a3a3a; text-shadow: none; }
    50%       { color: var(--neon-green); text-shadow: 0 0 8px rgba(0, 255, 0, 0.6); }
}

/* --- 14. MOBILE --- */
@media (max-width: 768px) {
    .brand-area { padding: 0.4rem 0.5rem 0; }
    .brand-name { font-size: clamp(1.8rem, 8vw, 2.4rem); }
    .tagline    { font-size: 0.7rem; margin-top: 0.1rem; }
    .top-nav    { padding: 0.5rem 0.8rem; gap: 1.2rem; }
    main        { padding: 1.5rem 1rem; }
    .card-title { font-size: clamp(1.4rem, 6vw, 1.8rem); }
}
