/* file: assets/css/style.css */

/* === ROOT VARIABLES === */
:root { --primary: #06b6d4; --primary-light: #22d3ee; --primary-dark: #0891b2; --secondary: #8b5cf6; --success: #10b981; --warning: #f59e0b; --danger: #ef4444; --bg-dark: #0b1020; --bg-medium: #111827; --bg-light: #1f2937; --text-light: #f9fafb; --text-medium: #d1d5db; --text-dark: #9ca3af; --border-color: rgba(255, 255, 255, 0.1); }
[data-theme="light"] { --bg-dark: #f8fafc; --bg-medium: #ffffff; --bg-light: #f1f5f9; --text-light: #0f172a; --text-medium: #475569; --text-dark: #64748b; --border-color: rgba(0, 0, 0, 0.1); }

/* === GLOBAL RESET === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg-dark); color: var(--text-medium); line-height: 1.6; transition: background-color 0.3s, color 0.3s; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; border: none; }

/* === LOADING SCREEN === */
/* === LOADING SCREEN === */
.loading-screen { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: var(--bg-dark); 
    z-index: 99999; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-direction: column; 
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 1;
    visibility: visible;
}
.loading-screen.hidden { 
    opacity: 0; 
    visibility: hidden; 
    pointer-events: none; 
}
.loader-wrapper { text-align: center; }
.loader { width: 80px; height: 80px; margin: 0 auto 30px; position: relative; }
.loader-inner { width: 100%; height: 100%; border: 4px solid rgba(6, 182, 212, 0.2); border-top-color: #06b6d4; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { color: var(--text-medium); font-size: 16px; font-weight: 600; }

/* === HEADER STYLES === */
.main-header { position: fixed; top: 0; left: 0; right: 0; background: var(--bg-medium); border-bottom: 1px solid var(--border-color); z-index: 1000; transition: background-color 0.3s, transform 0.3s; }
.main-header.scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); }
.header-container { max-width: 1600px; margin: 0 auto; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo-section { display: flex; align-items: center; gap: 15px; }
.logo { width: 45px; height: 45px; background: linear-gradient(135deg, var(--primary), var(--secondary)); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 800; font-size: 20px; transition: transform 0.3s; text-decoration: none; }
.logo:hover { transform: rotate(5deg) scale(1.05); }
.logo-text { font-size: 22px; font-weight: 800; color: var(--text-light); letter-spacing: -0.5px; }
.logo-text span { color: var(--primary); }

/* === NAVIGATION === */
.main-nav { display: flex; gap: 5px; align-items: center; }
.nav-link { padding: 10px 18px; color: var(--text-medium); border-radius: 8px; font-weight: 600; font-size: 14px; transition: all 0.3s; display: flex; align-items: center; gap: 8px; }
.nav-link:hover { background: var(--bg-light); color: var(--text-light); }
.nav-link.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; }
.nav-link i { font-size: 16px; }

/* === HEADER ACTIONS === */
.header-actions { display: flex; align-items: center; gap: 15px; }
.theme-toggle { padding: 10px 20px; background: var(--bg-light); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-medium); font-weight: 600; transition: all 0.3s; display: flex; align-items: center; gap: 8px; }
.theme-toggle:hover { background: var(--bg-dark); color: var(--primary); transform: translateY(-2px); }
.theme-toggle i { font-size: 16px; }

/* === NOTIFICATION BUTTON === */
.notification-btn { position: relative; width: 42px; height: 42px; border-radius: 10px; background: var(--bg-light); border: 1px solid var(--border-color); color: var(--text-medium); transition: all 0.3s; display: flex; align-items: center; justify-content: center; }
.notification-btn:hover { background: var(--bg-dark); color: var(--primary); transform: translateY(-2px); }
.notification-badge { position: absolute; top: -5px; right: -5px; background: var(--danger); color: white; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-medium); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

/* === USER MENU === */
.user-menu { position: relative; }
.user-menu-btn { display: flex; align-items: center; gap: 12px; padding: 6px 12px; background: var(--bg-light); border: 1px solid var(--border-color); border-radius: 10px; transition: all 0.3s; }
.user-menu-btn:hover { border-color: var(--primary); transform: translateY(-2px); }
.user-avatar { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-info { display: flex; flex-direction: column; align-items: flex-start; }
.user-name { color: var(--text-light); font-weight: 700; font-size: 14px; }
.user-role { color: var(--text-dark); font-size: 11px; text-transform: uppercase; font-weight: 600; }
.dropdown-icon { color: var(--text-dark); font-size: 12px; transition: transform 0.3s; }
.user-menu-btn:hover .dropdown-icon { transform: rotate(180deg); }

/* === USER DROPDOWN === */
.user-dropdown { position: absolute; top: calc(100% + 10px); right: 0; background: var(--bg-medium); border: 1px solid var(--border-color); border-radius: 12px; min-width: 220px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s; z-index: 1001; }
.user-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { padding: 12px 18px; color: var(--text-medium); display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border-color); transition: all 0.3s; }
.dropdown-item:first-child { border-radius: 12px 12px 0 0; }
.dropdown-item:last-child { border-bottom: none; border-radius: 0 0 12px 12px; }
.dropdown-item:hover { background: var(--bg-light); color: var(--text-light); padding-left: 22px; }
.dropdown-item i { font-size: 16px; width: 20px; }
.dropdown-item.logout { color: var(--danger); }
.dropdown-item.logout:hover { background: rgba(239, 68, 68, 0.1); }

/* === MOBILE MENU === */
.mobile-menu-btn { display: none; width: 42px; height: 42px; border-radius: 10px; background: var(--bg-light); border: 1px solid var(--border-color); color: var(--text-medium); align-items: center; justify-content: center; transition: all 0.3s; }
.mobile-menu-btn:hover { background: var(--bg-dark); color: var(--primary); }
.mobile-nav { position: fixed; top: 70px; left: 0; right: 0; background: var(--bg-medium); border-bottom: 1px solid var(--border-color); padding: 20px; transform: translateY(-100%); opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 999; }
.mobile-nav.active { transform: translateY(0); opacity: 1; visibility: visible; }
.mobile-nav .nav-link { width: 100%; margin-bottom: 8px; justify-content: flex-start; }

/* === GOOGLE TRANSLATE === */
#google_translate_element { margin-right: 10px; }
.goog-te-banner-frame { display: none !important; }
body { top: 0px !important; }
.goog-te-gadget-simple {
    background-color: var(--bg-light) !important;
    border: 1px solid var(--border-color) !important;
    padding: 8px !important;
    border-radius: 8px !important;
}
.goog-te-gadget-simple span { color: var(--text-medium) !important; }

/* Header should be above translate elements */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-medium);
    border-bottom: 1px solid var(--border-color);
    z-index: 10000; /* Higher than translate widget */
    transition: background-color 0.3s, transform 0.3s;
}

/* Footer should stay below */
.main-footer {
    position: relative;
    z-index: 1;
}

/* === MAIN CONTENT === */
.main-content { padding: 30px; max-width: 1600px; margin: 0 auto; min-height: calc(100vh - 200px); }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; }
.page-header h1 { font-size: 28px; font-weight: 800; color: var(--text-light); display: flex; align-items: center; gap: 12px; }
.page-header h1 i { color: var(--primary); }

/* === BREADCRUMBS === */
.breadcrumbs { display: flex; align-items: center; gap: 8px; padding: 12px 0; color: var(--text-dark); font-size: 14px; }
.breadcrumbs a { color: var(--text-medium); transition: color 0.3s; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs i { font-size: 10px; }

/* === NEWS LAYOUT === */
.main-layout-container { display: grid; grid-template-columns: 420px 1fr; gap: 30px; height: calc(100vh - 180px); }
.left-column { display: flex; flex-direction: column; background: var(--bg-medium); border-radius: 12px; border: 1px solid var(--border-color); overflow: hidden; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); }
.right-column { background: var(--bg-medium); border-radius: 12px; border: 1px solid var(--border-color); overflow-y: auto; padding: 40px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); }
.right-column::-webkit-scrollbar { width: 8px; }
.right-column::-webkit-scrollbar-track { background: var(--bg-light); }
.right-column::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* === FILTER BAR === */
.filter-bar { display: flex; gap: 8px; padding: 15px; background: var(--bg-light); border-bottom: 1px solid var(--border-color); overflow-x: auto; flex-wrap: nowrap; }
.filter-bar::-webkit-scrollbar { height: 6px; }
.filter-bar::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
.filter-btn { padding: 8px 16px; background: var(--bg-medium); color: var(--text-medium); border: 1px solid var(--border-color); border-radius: 8px; font-weight: 600; transition: all 0.3s; white-space: nowrap; font-size: 13px; }
.filter-btn:hover { background: var(--primary); color: white; border-color: var(--primary); transform: translateY(-2px); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* === NEWS FEED === */
.news-feed-list { flex: 1; overflow-y: auto; padding: 10px; }
.news-feed-list::-webkit-scrollbar { width: 6px; }
.news-feed-list::-webkit-scrollbar-track { background: var(--bg-light); }
.news-feed-list::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
.feed-item { display: flex; gap: 12px; padding: 12px; border-radius: 10px; cursor: pointer; transition: all 0.3s; border-bottom: 1px solid var(--border-color); }
.feed-item:last-child { border-bottom: none; }
.feed-item:hover { background: var(--bg-light); transform: translateX(5px); }
.feed-item.active { background: var(--bg-light); border-left: 3px solid var(--primary); }
.feed-item-image { width: 90px; height: 70px; flex-shrink: 0; border-radius: 8px; background: var(--bg-dark); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.feed-item-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.feed-item:hover .feed-item-image img { transform: scale(1.05); }
.feed-item-image i { font-size: 24px; color: var(--text-dark); }
.feed-item-content { flex: 1; min-width: 0; }
.feed-item-category { display: inline-block; background: rgba(6, 182, 212, 0.15); color: var(--primary); padding: 3px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; margin-bottom: 5px; }
.feed-item-title { color: var(--text-light); font-weight: 600; font-size: 14px; margin-bottom: 6px;  -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.feed-item-meta { display: flex; align-items: center; gap: 10px; color: var(--text-dark); font-size: 11px; }
.feed-item-meta i { font-size: 10px; }

/* === POST VIEW === */
.empty-state-view { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-dark); text-align: center; }
.empty-state-view i { font-size: 64px; margin-bottom: 20px; opacity: 0.3; }
.empty-state-view p { font-size: 16px; font-weight: 500; }
.post-view-header { margin-bottom: 30px; padding-bottom: 25px; border-bottom: 2px solid var(--border-color); }
.post-category-badge { display: inline-block; background: rgba(6, 182, 212, 0.15); color: var(--primary); padding: 6px 14px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; margin-bottom: 15px; }
.post-title { color: var(--text-light); font-size: 32px; font-weight: 800; margin-bottom: 20px; line-height: 1.3; }
.post-author-info { display: flex; align-items: center; gap: 12px; }
.post-author-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.post-author-details { flex: 1; }
.post-author-name { color: var(--text-light); font-weight: 700; font-size: 15px; }
.post-timestamp { color: var(--text-dark); font-size: 13px; display: flex; align-items: center; gap: 5px; }
.post-timestamp i { font-size: 11px; }
.post-image { width: 100%; max-height: 500px; object-fit: cover; border-radius: 12px; margin-bottom: 30px; transition: transform 0.3s; }
.post-image:hover { transform: scale(1.02); }
.post-content-text { color: var(--text-medium); font-size: 17px; line-height: 1.9; margin-bottom: 30px; }

/* === POST ACTIONS === */
.post-actions { display: flex; gap: 15px; padding: 20px 0; border-top: 2px solid var(--border-color); border-bottom: 2px solid var(--border-color); margin-bottom: 30px; }
.action-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; background: var(--bg-light); border: 1px solid var(--border-color); border-radius: 10px; color: var(--text-medium); font-weight: 600; transition: all 0.3s; font-size: 14px; }
.action-btn:hover { background: var(--bg-dark); color: var(--text-light); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.action-btn.liked { color: var(--danger); border-color: var(--danger); background: rgba(239, 68, 68, 0.1); }
.action-btn i { font-size: 18px; }

/* === COMMENTS === */
.comments-section { margin-top: 30px; }
.comments-header { color: var(--text-light); font-size: 20px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.comments-header i { color: var(--primary); }
.comment-input-wrapper { display: flex; gap: 12px; margin-bottom: 25px; padding: 20px; background: var(--bg-light); border-radius: 12px; border: 1px solid var(--border-color); }
.comment-input-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.comment-input-field { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.comment-input-field input { width: 100%; padding: 14px 18px; background: var(--bg-medium); border: 1px solid var(--border-color); border-radius: 10px; color: var(--text-light); font-size: 14px; transition: all 0.3s; }
.comment-input-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1); }
.comment-submit-btn { padding: 10px 24px; background: var(--primary); color: white; border-radius: 8px; font-weight: 600; transition: all 0.3s; align-self: flex-end; display: flex; align-items: center; gap: 8px; }
.comment-submit-btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3); }
.comments-list { display: flex; flex-direction: column; gap: 15px; }
.comment-item { display: flex; gap: 12px; padding: 18px; background: var(--bg-light); border-radius: 12px; border: 1px solid var(--border-color); transition: all 0.3s; }
.comment-item:hover { border-color: var(--primary); }
.comment-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--secondary), var(--primary)); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.comment-content { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.comment-author { color: var(--text-light); font-weight: 700; font-size: 14px; }
.comment-time { color: var(--text-dark); font-size: 12px; }
.comment-text { color: var(--text-medium); font-size: 14px; line-height: 1.6; margin-bottom: 12px; word-wrap: break-word; }
.comment-actions { display: flex; gap: 15px; }
.comment-action-btn { background: none; color: var(--text-dark); font-size: 13px; font-weight: 600; transition: all 0.3s; display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; }
.comment-action-btn:hover { color: var(--primary); background: rgba(6, 182, 212, 0.1); }
.comment-action-btn.liked { color: var(--danger); }

/* === FOOTER === */
.main-footer { background: var(--bg-medium); border-top: 1px solid var(--border-color); margin-top: 60px; transition: background-color 0.3s; }
.footer-container { max-width: 1600px; margin: 0 auto; padding: 40px 30px 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-section h3 { color: var(--text-light); font-size: 18px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.footer-section h3 i { color: var(--primary); }
.footer-about { max-width: 350px; }
.footer-about p { color: var(--text-medium); line-height: 1.8; margin-bottom: 20px; font-size: 14px; }
.footer-social { display: flex; gap: 12px; }
.social-btn { width: 40px; height: 40px; border-radius: 10px; background: var(--bg-light); border: 1px solid var(--border-color); color: var(--text-medium); display: flex; align-items: center; justify-content: center; transition: all 0.3s; }
.social-btn:hover { background: var(--primary); color: white; border-color: var(--primary); transform: translateY(-3px); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--text-medium); font-size: 14px; transition: all 0.3s; display: flex; align-items: center; gap: 8px; }
.footer-links a:hover { color: var(--primary); padding-left: 8px; }
.footer-links a i { font-size: 12px; opacity: 0.6; }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; color: var(--text-medium); font-size: 14px; }
.footer-contact li i { color: var(--primary); font-size: 16px; margin-top: 2px; }
.footer-bottom { padding-top: 25px; border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-copyright { color: var(--text-dark); font-size: 14px; }
.footer-copyright strong { color: var(--text-light); font-weight: 700; }
.footer-bottom-links { display: flex; gap: 25px; }
.footer-bottom-links a { color: var(--text-medium); font-size: 13px; font-weight: 600; transition: all 0.3s; }
.footer-bottom-links a:hover { color: var(--primary); }

/* === BACK TO TOP === */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3); opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s; z-index: 999; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(6, 182, 212, 0.4); }
.back-to-top i { font-size: 20px; }

/* === TOAST NOTIFICATIONS === */
.toast { position: fixed; top: 20px; right: 20px; padding: 16px 24px; background: var(--bg-medium); border: 1px solid var(--border-color); border-radius: 10px; color: var(--text-light); font-weight: 600; z-index: 10000; display: flex; align-items: center; gap: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); animation: slideIn 0.3s ease; }
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
@keyframes slideIn { from { transform: translateX(400px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* === LOADING === */
.loading { display: none; text-align: center; padding: 30px; color: var(--text-dark); }
.loading.active { display: block; }
.loading i { font-size: 24px; animation: spin 1s linear infinite; }

/* === RESPONSIVE === */
@media (max-width: 1200px) { .main-layout-container { grid-template-columns: 380px 1fr; } }
@media (max-width: 1024px) { .main-nav { display: none; } .mobile-menu-btn { display: flex; } .main-layout-container { grid-template-columns: 1fr; height: auto; } .right-column { display: none; } .right-column.mobile-active { display: block; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999; border-radius: 0; } .left-column { max-height: calc(100vh - 150px); } .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 768px) { .header-container { padding: 0 15px; height: 60px; } .logo-text { display: none; } .user-name { display: none; } .theme-toggle span { display: none; } .notification-btn { width: 38px; height: 38px; } .main-content { padding: 15px; } .page-header h1 { font-size: 22px; } .post-title { font-size: 24px; } .right-column { padding: 20px; } .footer-container { padding: 30px 15px 20px; } .footer-grid { grid-template-columns: 1fr; gap: 30px; } .footer-about { max-width: 100%; } .footer-bottom { flex-direction: column; text-align: center; } .footer-bottom-links { justify-content: center; } .back-to-top { bottom: 20px; right: 20px; width: 45px; height: 45px; } }

/* === UTILITY CLASSES === */
.text-center { text-align: center; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }
.hidden { display: none; }
.visible { display: block; }