/*
Theme Name: FB Modern Canvas Pro
Theme URI: https://example.com/fb-modern-canvas-pro
Author: AI Designer Pro v2
Description: O versiune complet modernizată, ultra-rapidă și premium inspirată de Facebook. Folosește design fluid, micro-interacțiuni, umbre stratificate, colturi rotunjite moderne (smooth corners), suport nativ premium pentru Dark/Light Mode prin variabile CSS și animații fluide de tip cubic-bezier.
Version: 2.0.0
Text Domain: fb-modern-canvas-pro
*/

:root {
    /* Light Mode Design Tokens */
    --bg-global: #f2f4f7;
    --bg-header: rgba(255, 255, 255, 0.85);
    --bg-card: #ffffff;
    --bg-input: #f0f2f5;
    --bg-hover: #f2f2f2;
    --bg-action-hover: rgba(0, 0, 0, 0.05);
    
    --brand-primary: #1877f2;
    --brand-primary-hover: #1565c0;
    --brand-primary-surface: rgba(24, 119, 242, 0.1);
    
    --text-main: #1c1e21;
    --text-secondary: #65676b;
    --text-muted: #8a8d91;
    
    --border-subtle: rgba(0, 0, 0, 0.06);
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02);
    --header-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Dark Mode Design Tokens (Premium Slate/Charcoal) */
        --bg-global: #0b0f12;
        --bg-header: rgba(21, 27, 31, 0.85);
        --bg-card: #151b1f;
        --bg-input: #222b32;
        --bg-hover: #2c373f;
        --bg-action-hover: rgba(255, 255, 255, 0.05);
        
        --brand-primary: #2e87ff;
        --brand-primary-hover: #4796ff;
        --brand-primary-surface: rgba(46, 135, 255, 0.15);
        
        --text-main: #f5f6f8;
        --text-secondary: #9aa4b0;
        --text-muted: #6b7785;
        
        --border-subtle: rgba(255, 255, 255, 0.06);
        --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 1px 4px rgba(0, 0, 0, 0.1);
        --header-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    }
}

/* Reset & Global Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-global);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    padding-top: 68px;
    min-height: 100vh;
    transition: background-color 0.3s ease;
}

/* Premium Header Modernizat with Blur Effect */
.fb-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--header-shadow);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition-smooth);
}

.fb-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fb-logo {
    background: linear-gradient(135deg, #1877f2, #0056b3);
    color: white !important;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3);
    transition: var(--transition-smooth);
}
.fb-logo:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(24, 119, 242, 0.4);
}

.fb-search-bar input {
    background-color: var(--bg-input);
    border: 1px solid transparent;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    color: var(--text-main);
    outline: none;
    font-size: 14px;
    width: 260px;
    transition: var(--transition-smooth);
}
.fb-search-bar input:focus {
    border-color: var(--brand-primary);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 4px var(--brand-primary-surface);
    width: 300px;
}

.fb-header-center {
    display: flex;
    gap: 6px;
}

.nav-icon {
    font-size: 20px;
    padding: 10px 24px;
    cursor: pointer;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-icon:hover {
    background-color: var(--bg-action-hover);
    transform: translateY(-1px);
}
.nav-icon.active {
    color: var(--brand-primary);
    background-color: var(--brand-primary-surface);
}

.fb-header-right {
    display: flex;
    align-items: center;
}

.fb-user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bg-input);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--border-subtle);
    transition: var(--transition-smooth);
    cursor: pointer;
}
.fb-user-badge:hover {
    background-color: var(--bg-hover);
    border-color: var(--text-muted);
}
.fb-user-badge img {
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
}

/* Container Fluid & Grid Layout */
.fb-container {
    display: grid;
    grid-template-columns: 280px 1fr 340px;
    gap: 24px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 24px 16px;
}

@media (max-width: 1150px) {
    .fb-container { grid-template-columns: 240px 1fr; }
    .fb-sidebar-right { display: none; }
}

@media (max-width: 820px) {
    .fb-container { grid-template-columns: 1fr; padding: 12px; }
    .fb-sidebar-left { display: none; }
}

/* Cards Premium & Spacing */
.fb-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-subtle);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

/* Sticky Left Side columns */
.fixed-sidebar-content {
    position: sticky;
    top: 92px;
}

.sidebar-user-row {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}
.sidebar-user-row:hover {
    background-color: var(--bg-action-hover);
}
.sidebar-user-row img {
    border-radius: var(--radius-full);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.fb-left-nav ul { list-style: none; }
.fb-left-nav li { margin-bottom: 6px; }
.fb-left-nav li a {
    display: block;
    padding: 12px 16px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}
.fb-left-nav li a:hover {
    background-color: var(--bg-action-hover);
    transform: translateX(4px);
}

/* Publisher Box (Ultra Modern Input Container) */
.fb-publisher .publisher-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.fb-publisher .publisher-top img, .anon-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.fb-publisher .publisher-top input {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid transparent;
    padding: 14px 20px;
    border-radius: var(--radius-full);
    font-size: 15px;
    color: var(--text-main);
    cursor: pointer;
    outline: none;
    transition: var(--transition-smooth);
}
.fb-publisher .publisher-top input:hover {
    background-color: var(--bg-hover);
}

.publisher-bottom {
    display: flex;
    justify-content: space-around;
    padding-top: 14px;
}
.pub-act {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}
.pub-act:hover {
    background-color: var(--bg-action-hover);
}

/* Modernized Posts Layout */
.fb-post {
    border: 1px solid var(--border-subtle);
}
.fb-post .post-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.fb-post .post-header img {
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
}
.post-meta-info { display: flex; flex-direction: column; }
.post-author-name {
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    font-size: 15px;
    transition: var(--transition-smooth);
}
.post-author-name:hover {
    color: var(--brand-primary);
}
.post-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.post-date a { color: var(--text-muted); text-decoration: none; }

.post-body .post-text-content {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
    color: var(--text-main);
}
.post-featured-image {
    margin: 12px -20px -4px -20px; /* Fullbleed view row effect */
    overflow: hidden;
}
.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 550px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.fb-post:hover .post-featured-image img {
    transform: scale(1.01);
}

/* Interactive Footer Actions with Micro-interactions */
.post-footer-actions {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--border-subtle);
    margin-top: 16px;
    padding-top: 6px;
}
.action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex: 1;
    justify-content: center;
    transition: var(--transition-smooth);
}
.action-btn:hover {
    background-color: var(--bg-action-hover);
    color: var(--text-main);
}
.action-btn:active {
    transform: scale(0.96);
}

/* Interactive Active Like State class injection via inline script */
.action-btn.like-btn.active {
    color: var(--brand-primary) !important;
    background-color: var(--brand-primary-surface) !important;
    animation: popEffect 0.3s ease;
}
@keyframes popEffect {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Comments System (Modern Bubble UI) */
.fb-comments-area {
    border-top: 1px solid var(--border-subtle);
    margin-top: 20px;
    padding-top: 20px;
}
.comments-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 700;
}
.comment-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}
.fb-comment-item {
    display: flex;
    gap: 12px;
    animation: fadeInUp 0.3s ease;
}
.comment-avatar img {
    border-radius: var(--radius-full);
}
.comment-content-box {
    background-color: var(--bg-input);
    padding: 12px 18px;
    border-radius: var(--radius-lg);
    max-width: 88%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: var(--transition-smooth);
}
.comment-content-box:hover {
    background-color: var(--bg-hover);
}
.comment-author-name {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 4px;
}
.comment-author-name a { color: var(--text-main); text-decoration: none; }
.comment-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-main);
}

/* Ultra Modern Rich Comment Box Form */
.comment-respond {
    margin-top: 20px;
}
.fb-comment-input-field textarea {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    color: var(--text-main);
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition-smooth);
}
.fb-comment-input-field textarea:focus {
    background-color: var(--bg-card);
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px var(--brand-primary-surface);
}
.fb-comment-submit {
    background: linear-gradient(135deg, #1877f2, #1565c0);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    float: right;
    box-shadow: 0 4px 10px rgba(24, 119, 242, 0.2);
    transition: var(--transition-smooth);
}
.fb-comment-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(24, 119, 242, 0.3);
}

/* Widgets & Sidebar Right */
.widget-title {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.widget-placeholder-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Single Context Mode adjustment */
.single-post-container {
    grid-template-columns: 1fr;
    max-width: 720px;
}

/* Premium Footer */
.fb-footer-global {
    text-align: center;
    padding: 32px;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
    margin-top: 60px;
    grid-column: 1 / -1;
}
