/**
 * Main CSS Variables and Layout - Premium Facebook-Inspired UI
 */
 :root {
    --fb-blue: #1877f2;
    --fb-blue-hover: #166fe5;
    --fb-bg: #f0f2f5;
    --fb-white: #ffffff;
    --fb-text-primary: #050505;
    --fb-text-secondary: #65676b;
    --fb-border: #ccd0d5;
    --fb-divider: #e4e6eb;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--fb-text-primary);
    background-color: var(--fb-bg);
    margin: 0; padding: 0; font-size: 15px;
}
a { text-decoration: none; color: var(--fb-blue); transition: 0.2s; }
a:hover { color: var(--fb-blue-hover); }

/* --- Containers --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.card {
    background: var(--fb-white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(0,0,0,0.05);
}
.main-content { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 24px; }
.content-area { flex: 1 1 65%; min-width: 0; }
.sidebar { flex: 1 1 30%; min-width: 300px; }

/* --- Header --- */
.site-header {
    background: var(--fb-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: sticky; top: 0; z-index: 100;
    margin: 0; border-radius: 0; border: none; padding: 0;
}
.header-container {
    display: flex; justify-content: space-between; align-items: center; height: 60px;
}
.site-branding .site-title { font-size: 22px; margin: 0; }
.site-branding .site-title a { color: var(--fb-blue); font-weight: 800; }

.header-search { flex: 1; display: flex; justify-content: center; padding: 0 20px; }
.search-input-wrap {
    position: relative; width: 100%; max-width: 400px;
}
.search-input-wrap .search-icon {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--fb-text-secondary);
}
.search-input-wrap input {
    width: 100%; padding: 10px 10px 10px 40px; border-radius: 50px;
    background: var(--fb-bg); border: none; font-size: 15px; outline: none; transition: 0.2s;
}
.search-input-wrap input:focus { box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2); background: #fff; }

.header-right { display: flex; align-items: center; gap: 15px; }
.user-profile-menu { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.user-profile-menu img { border-radius: 50%; width: 36px; height: 36px; }
.logout-btn { color: var(--fb-text-secondary); font-size: 18px; }
.logout-btn:hover { color: #dc3545; }
.mobile-menu-toggle { display: none; background: none; border: none; font-size: 24px; color: var(--fb-text-secondary); cursor: pointer; }

/* --- Nav --- */
.header-nav-wrap { border-top: 1px solid var(--fb-divider); }
.main-navigation ul { display: flex; list-style: none; padding: 0; margin: 0; }
.main-navigation li a {
    display: block; padding: 12px 15px; font-weight: 600; color: var(--fb-text-secondary); transition: 0.2s;
}
.main-navigation li a:hover { color: var(--fb-blue); border-bottom: 3px solid var(--fb-blue); padding-bottom: 9px; }

/* --- Buttons --- */
.btn {
    display: inline-block; padding: 8px 16px; font-size: 15px; font-weight: 600;
    text-align: center; border: none; border-radius: 6px; cursor: pointer; transition: 0.2s;
}
.btn-primary { background: var(--fb-blue); color: #fff !important; }
.btn-primary:hover { background: var(--fb-blue-hover); }

/* --- Ask Trigger (Fake Input) --- */
.ask-question-trigger { padding: 15px; cursor: pointer; transition: 0.2s; }
.ask-question-trigger:hover { background: #fafafa; }
.trigger-inner { display: flex; align-items: center; gap: 10px; }
.trigger-inner img { border-radius: 50%; width: 40px; height: 40px; }
.trigger-inner input {
    flex: 1; border-radius: 50px; background: var(--fb-bg); border: none; padding: 12px 20px;
    font-size: 16px; color: var(--fb-text-secondary); cursor: pointer; outline: none;
}
.trigger-inner input:hover { background: #e4e6eb; }

/* --- Modals --- */
.web3s-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(5px);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
}
.close-modal { position: absolute; top: 15px; right: 15px; font-size: 30px; cursor: pointer; color: var(--fb-text-secondary); line-height: 1; }
.close-modal:hover { color: var(--fb-text-primary); }

/* --- Responsive --- */
@media (max-width: 768px) {
    .main-content { flex-direction: column; }
    .sidebar { min-width: 100%; }
    .header-search { display: none; /* Can toggle search later */ }
    .mobile-menu-toggle { display: block; }
    .header-nav-wrap { display: none; } /* Add toggle JS to show this */
}
