/* ============================================
   SSX Platform - Main Stylesheet
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0170B9;
    --primary-dark: #015a94;
    --primary-light: #e6f1f8;
    --secondary: #4B4F58;
    --success: #34a853;
    --danger: #ea4335;
    --warning: #fbbc04;
    --dark: #3a3a3a;
    --gray-900: #424242;
    --gray-700: #4B4F58;
    --gray-500: #4F4F4F;
    --gray-300: #E5E5E5;
    --gray-100: #F5F5F5;
    --white: #ffffff;
    --bg: #F5F5F5;
    --card-bg: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
    --radius: 8px;
    --radius-lg: 12px;
    --header-height: 56px;
    --sidebar-width: 280px;
}

/* --- Passion Theme Override --- */
[data-theme="passion"] {
    --primary: #e91e63;
    --primary-dark: #c2185b;
    --primary-light: #4a3a42;
    --secondary: #9e8aab;
    --dark: #f5e6f0;
    --gray-900: #e8d0e0;
    --gray-700: #d4b8c8;
    --gray-500: #b898a8;
    --gray-300: #524550;
    --gray-100: #3e3540;
    --white: #f5e8f2;
    --bg: #2e2a2c;
    --card-bg: #3a3538;
    --shadow: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.12);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.12);
}

/* Auth page */
[data-theme="passion"] .auth-page {
    background: #282528;
}

[data-theme="passion"] .auth-page::after {
    background:
        radial-gradient(ellipse at center top, rgba(233, 30, 99, 0.06) 0%, transparent 60%),
        linear-gradient(180deg, rgba(40, 37, 40, 0.5) 0%, rgba(40, 37, 40, 0.9) 100%);
}

[data-theme="passion"] .auth-card {
    background: rgba(58, 53, 56, 0.9);
    border-color: rgba(233, 30, 99, 0.15);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="passion"] .auth-card .form-control {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="passion"] .auth-card .form-control:focus {
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.2);
}

[data-theme="passion"] .auth-card .btn-primary {
    background: linear-gradient(90deg, #e91e63 0%, #9c27b0 50%, #e91e63 100%);
    background-size: 200% 100%;
    box-shadow: 0 4px 18px rgba(233, 30, 99, 0.3);
}

[data-theme="passion"] .auth-card .btn-primary:hover {
    box-shadow: 0 6px 24px rgba(233, 30, 99, 0.45);
}

[data-theme="passion"] .auth-card .auth-switch a {
    color: #f06292;
}

/* auth card select options handled by global passion select rule */

[data-theme="passion"] .auth-header-logo {
    filter: drop-shadow(0 2px 12px rgba(233, 30, 99, 0.25));
}

/* Main header */
[data-theme="passion"] .main-header {
    background: #2e2a2c;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="passion"] .header-search input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="passion"] .header-search input:focus {
    border-color: #e91e63;
}

[data-theme="passion"] .header-nav-item {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="passion"] .header-nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="passion"] .header-user img {
    border-color: rgba(233, 30, 99, 0.4);
}

[data-theme="passion"] .mobile-menu-toggle {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="passion"] .mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Cards & content */
[data-theme="passion"] .card {
    background: var(--card-bg);
    border: 1px solid rgba(233, 30, 99, 0.08);
}

[data-theme="passion"] .card-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    color: var(--dark);
}

[data-theme="passion"] .nav-menu li a {
    color: #d4b8c8;
}

[data-theme="passion"] .nav-menu li a:hover,
[data-theme="passion"] .nav-menu li a.active {
    background: var(--primary-light);
    color: #f06292;
}

[data-theme="passion"] .profile-card .avatar {
    border-color: #e91e63;
}

[data-theme="passion"] .profile-card-avatar-link:hover .avatar {
    box-shadow: 0 0 0 3px #e91e63;
}

[data-theme="passion"] .profile-stats .stat-value {
    color: #f06292;
}

/* Post area */
[data-theme="passion"] .create-post-top textarea {
    background: rgba(255, 255, 255, 0.08);
    color: var(--dark);
}

[data-theme="passion"] .create-post-top textarea:focus {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

[data-theme="passion"] .post-actions button:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="passion"] .post-actions button.liked {
    color: #f06292;
}

/* Sidebar right */
[data-theme="passion"] .widget-title {
    color: #d4b8c8;
}

/* Inputs in app context */
[data-theme="passion"] .main-layout .form-control,
[data-theme="passion"] .create-post .form-control {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--dark);
}

[data-theme="passion"] .main-layout .form-control:focus,
[data-theme="passion"] .create-post .form-control:focus {
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.15);
}

[data-theme="passion"] .form-control-static {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--dark);
}

/* Passion: all selects get light arrow + dark options */
[data-theme="passion"] select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23d4b8c8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
}

[data-theme="passion"] select.form-control option {
    background: #3a3538;
    color: #f5e6f0;
}

/* Profile cover */
[data-theme="passion"] .profile-cover {
    background: linear-gradient(135deg, #2e2a2c 0%, #3a3538 50%, #44383e 100%);
}

[data-theme="passion"] .profile-page-avatar {
    border-color: rgba(233, 30, 99, 0.5);
}

[data-theme="passion"] .profile-account-type {
    color: #f06292;
}

[data-theme="passion"] .profile-section-title::before {
    background: #e91e63;
}

[data-theme="passion"] .avatar-upload-btn {
    background: #e91e63;
}

[data-theme="passion"] .avatar-upload-btn:hover {
    background: #c2185b;
}

/* Alerts in passion */
[data-theme="passion"] .alert-success {
    background: rgba(46, 213, 115, 0.1);
    color: #2ed573;
    border-color: rgba(46, 213, 115, 0.2);
}

[data-theme="passion"] .alert-error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.2);
}

/* Buttons in passion */
[data-theme="passion"] .btn-primary {
    background: #e91e63;
    color: #fff;
}

[data-theme="passion"] .btn-primary:hover {
    background: #c2185b;
}

[data-theme="passion"] .btn-outline {
    border-color: rgba(255, 255, 255, 0.15);
    color: #d4b8c8;
}

[data-theme="passion"] .btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Dropdown */
[data-theme="passion"] .dropdown-menu {
    background: #3a3538;
    border-color: rgba(233, 30, 99, 0.1);
}

[data-theme="passion"] .dropdown-menu a {
    color: #d4b8c8;
}

[data-theme="passion"] .dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f5e6f0;
}

[data-theme="passion"] .dropdown-menu hr {
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* Mobile bottom nav */
[data-theme="passion"] .mobile-bottom-nav {
    background: #2e2a2c;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="passion"] .mobile-bottom-nav a {
    color: #b898a8;
}

[data-theme="passion"] .mobile-bottom-nav a.active,
[data-theme="passion"] .mobile-bottom-nav a:hover {
    color: #f06292;
}

/* Sidebar bg */
[data-theme="passion"] .sidebar-left {
    background: #2e2a2c;
}

/* Mobile search overlay */
[data-theme="passion"] .mobile-search-overlay {
    background: #2e2a2c;
}

[data-theme="passion"] .mobile-search-overlay input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f5e6f0;
}

[data-theme="passion"] .mobile-search-overlay input:focus {
    border-color: #e91e63;
}

/* Modal */
[data-theme="passion"] .sw-modal {
    background: #3a3538;
    border: 1px solid rgba(233, 30, 99, 0.12);
}

[data-theme="passion"] .sw-modal-title {
    color: #f5e6f0;
}

[data-theme="passion"] .sw-modal-message {
    color: #d4b8c8;
}

/* Date picker */
[data-theme="passion"] .sw-dp-dropdown {
    background: #3a3538;
    border-color: rgba(233, 30, 99, 0.15);
}

[data-theme="passion"] .sw-dp-nav {
    background: rgba(255, 255, 255, 0.08);
    color: #d4b8c8;
}

[data-theme="passion"] .sw-dp-nav:hover {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="passion"] .sw-dp-selectors select {
    background-color: #3a3538;
    border-color: rgba(255, 255, 255, 0.12);
    color: #e91e63;
}

[data-theme="passion"] .sw-dp-selectors select option {
    background: #3a3538;
    color: #e91e63;
}

[data-theme="passion"] .sw-dp-selectors select:focus {
    border-color: #e91e63;
}

[data-theme="passion"] .sw-dp-day {
    color: #f5e6f0;
}

[data-theme="passion"] .sw-dp-day:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="passion"] .sw-dp-day.today {
    box-shadow: inset 0 0 0 2px #e91e63;
}

[data-theme="passion"] .sw-dp-day.selected {
    background: #e91e63;
    color: #fff;
}

[data-theme="passion"] .sw-dp-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="passion"] .sw-dp-today-btn {
    color: #f06292;
}

[data-theme="passion"] .sw-dp-today-btn:hover {
    background: rgba(233, 30, 99, 0.1);
}

/* Lang/Theme switcher dropdowns in passion */
[data-theme="passion"] .lang-dropdown-menu,
[data-theme="passion"] .theme-dropdown-menu {
    background: #3a3538;
    border-color: rgba(233, 30, 99, 0.1);
}

[data-theme="passion"] .lang-dropdown-item:hover,
[data-theme="passion"] .theme-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="passion"] .lang-dropdown-item.active,
[data-theme="passion"] .theme-dropdown-item.active {
    color: #f06292;
}

[data-theme="passion"] .lang-check,
[data-theme="passion"] .theme-dropdown-item .lang-check {
    color: #f06292;
}

/* Footer links */
[data-theme="passion"] a {
    color: #f06292;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Auth Page (Login / Register) --- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    background: #1a1a2e;
    color: #e4e6eb;
    font-family: Arial, sans-serif;
}

.auth-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/images/auth-bg.jpg') center center / cover no-repeat;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at center top, rgba(65, 195, 195, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, rgba(26, 26, 46, 0.6) 0%, rgba(26, 26, 46, 0.95) 100%);
    z-index: 0;
    pointer-events: none;
}

/* --- Language Switcher (custom dropdown with flags) --- */
.lang-switcher {
    display: flex;
    align-items: center;
}

.lang-dropdown {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #e4e6eb;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.lang-current:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.25);
}

.lang-flag {
    width: 20px;
    height: 14px;
    display: inline-flex;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
}

.lang-flag svg {
    width: 100%;
    height: 100%;
    display: block;
}

.lang-code {
    letter-spacing: 0.5px;
}

.lang-arrow {
    font-size: 0.55rem;
    color: #838daa;
    transition: transform 0.2s;
    margin-left: 2px;
}

.lang-dropdown.open .lang-arrow {
    transform: rotate(180deg);
}

/* Dropdown menu */
.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #2a2a3e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 4px;
    min-width: 160px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    z-index: 2001;
    display: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.15s, transform 0.15s;
}

.lang-dropdown.open .lang-dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: #b0b3b8;
    text-decoration: none;
    border-radius: 7px;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
}

.lang-dropdown-item:hover {
    background: rgba(255,255,255,0.08);
    color: #e4e6eb;
    text-decoration: none;
}

.lang-dropdown-item.active {
    color: #41c3c3;
}

.lang-dropdown-item .lang-name {
    flex: 1;
    font-weight: 500;
}

.lang-dropdown-item .lang-code {
    font-size: 0.7rem;
    color: #838daa;
}

.lang-check {
    font-size: 0.7rem;
    color: #41c3c3;
    margin-left: 4px;
}

/* --- Theme Switcher --- */
.theme-switcher {
    display: flex;
    align-items: center;
}

.theme-dropdown {
    position: relative;
}

.theme-current {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #e4e6eb;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.theme-current:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.25);
}

.theme-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    flex-shrink: 0;
}

.theme-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.theme-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #2a2a3e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 4px;
    min-width: 140px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    z-index: 2001;
    display: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.15s, transform 0.15s;
}

.theme-dropdown.open .theme-dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.theme-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: #b0b3b8;
    text-decoration: none;
    border-radius: 7px;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
}

.theme-dropdown-item:hover {
    background: rgba(255,255,255,0.08);
    color: #e4e6eb;
    text-decoration: none;
}

.theme-dropdown-item.active {
    color: #41c3c3;
}

.theme-dropdown-item .theme-name {
    flex: 1;
    font-weight: 500;
}

/* Header switchers group */
.header-switchers {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

/* Auth page - lang switcher aliniament */
.auth-header .lang-switcher {
    margin-left: 0;
}

/* Header - spacing */
.main-header .lang-switcher {
    margin-right: 4px;
}

/* Mobile - lang dropdown opens left */
@media (max-width: 768px) {
    .lang-dropdown-menu {
        right: 0;
        left: auto;
    }
}

/* --- Auth Header (Landing top bar) --- */
.auth-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 10;
}

.auth-header-logo {
    height: 36px;
    width: auto;
    filter: drop-shadow(0 2px 12px rgba(65, 195, 195, 0.2));
}

.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

/* --- Auth Logo (above card) --- */
.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-img {
    max-width: 260px;
    height: auto;
    filter: drop-shadow(0 4px 24px rgba(65, 195, 195, 0.2));
}

[data-theme="passion"] .auth-logo-img {
    filter: drop-shadow(0 4px 24px rgba(233, 30, 99, 0.2));
}

/* --- Auth Card (Glassmorphism) --- */
.auth-card {
    background: rgba(56, 58, 69, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 20px;
    padding: 36px 32px 32px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-card h2 {
    font-size: 1.25rem;
    margin-bottom: 26px;
    text-align: center;
    font-weight: 600;
    color: #e4e6eb;
    letter-spacing: 0.3px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.2px;
}

/* Auth page label color */
.auth-card .form-group label {
    color: #838daa;
}

/* App label color */
.main-layout .form-group label,
.create-post .form-group label {
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 13px 18px;
    border-radius: 1.25rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

/* Global select styling */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234B4F58' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Auth page inputs (dark glass style) */
.auth-card .form-control {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e4e6eb;
}

.auth-card .form-control:focus {
    border-color: #41c3c3;
    box-shadow: 0 0 0 3px rgba(65, 195, 195, 0.15);
}

.auth-card .form-control::placeholder {
    color: rgba(131, 141, 170, 0.6);
}

/* Auth select arrow color override (light arrow on dark bg) */
.auth-card select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23838daa' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
}

.auth-card select.form-control option {
    background: #2a2a3e;
    color: #e4e6eb;
}

/* App inputs (light style) */
.main-layout .form-control,
.create-post .form-control {
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    color: var(--dark);
}

.main-layout .form-control:focus,
.create-post .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(1, 112, 185, 0.15);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Auth page primary button - gradient animated */
.auth-card .btn-primary {
    background: linear-gradient(90deg, #41c3c3 0%, #969eed 50%, #41c3c3 100%);
    background-size: 200% 100%;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    padding: 13px;
    cursor: pointer;
    transition: background-position 0.5s ease, box-shadow 0.3s ease, transform 0.15s ease;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 18px rgba(65, 195, 195, 0.25);
}

.auth-card .btn-primary:hover {
    background-position: 100% 0;
    box-shadow: 0 6px 24px rgba(65, 195, 195, 0.35);
}

.auth-card .btn-primary:active {
    transform: scale(0.985);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #2d8f47;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-100);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.auth-switch {
    text-align: center;
    margin-top: 28px;
    font-size: 0.88rem;
}

/* Auth page switch link */
.auth-card .auth-switch {
    color: #838daa;
}

.auth-card .auth-switch a {
    color: #41c3c3;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.auth-card .auth-switch a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* App context switch */
.main-layout .auth-switch {
    color: var(--gray-700);
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    line-height: 1.45;
}

/* Auth page alerts (dark context) */
.auth-card .alert-error {
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.25);
}

.auth-card .alert-success {
    background: rgba(46, 213, 115, 0.12);
    color: #2ed573;
    border: 1px solid rgba(46, 213, 115, 0.25);
}

/* App alerts (light context) */
.alert-error {
    background: #fce8e6;
    color: var(--danger);
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #e6f4ea;
    color: var(--success);
    border: 1px solid #b7e1cd;
}

/* --- Main Header (Logged In) --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: #1a1a2e;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
}

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

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo:hover {
    text-decoration: none;
}

.header-logo-img {
    height: 36px;
    width: auto;
}

.header-search {
    position: relative;
}

.header-search input {
    padding: 8px 16px 8px 36px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    color: #e4e6eb;
    width: 280px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.header-search input::placeholder {
    color: #838daa;
}

.header-search input:focus {
    outline: none;
    background: rgba(255,255,255,0.12);
    border-color: #41c3c3;
    width: 340px;
}

.header-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #838daa;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #b0b3b8;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

.header-nav-item:hover {
    background: rgba(255,255,255,0.15);
    color: #e4e6eb;
    text-decoration: none;
}

.header-nav-item .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
    color: #e4e6eb;
}

.header-user:hover {
    background: rgba(255,255,255,0.1);
}

.header-user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(65,195,195,0.3);
}

.header-user span {
    font-weight: 500;
    font-size: 0.9rem;
    color: #e4e6eb;
}

.header-user .fa-caret-down {
    color: #838daa;
}

/* --- Main Layout (3 Columns) --- */
.main-layout {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

.sidebar-left {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
}

.sidebar-right {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
}

.main-content {
    margin-left: var(--sidebar-width);
    margin-right: var(--sidebar-width);
    flex: 1;
    padding: 20px;
    max-width: calc(100% - var(--sidebar-width) * 2);
}

/* --- Cards --- */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    overflow: hidden;
}

.card-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 16px;
}

/* --- User Profile Card (Left Sidebar) --- */
.profile-card {
    text-align: center;
    padding: 12px 16px;
}

.profile-card .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    margin-bottom: 12px;
}

.profile-card .user-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.profile-card .user-handle {
    color: var(--gray-500);
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    border-top: 1px solid var(--gray-100);
}

.profile-stats .stat {
    text-align: center;
}

.profile-stats .stat-value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
}

.profile-stats .stat-label {
    font-size: 0.72rem;
    color: var(--gray-500);
    text-transform: uppercase;
}

/* --- Navigation Menu (Left Sidebar) --- */
.nav-menu {
    list-style: none;
}

.nav-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.2s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
}

.nav-menu li a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.nav-menu-separator {
    height: 1px;
    background: var(--gray-300);
    margin: 8px 14px;
}

/* Profile card avatar link */
.profile-card-avatar-link {
    display: inline-block;
    border-radius: 50%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-card-avatar-link:hover {
    transform: scale(1.05);
    text-decoration: none;
}

.profile-card-avatar-link:hover .avatar {
    box-shadow: 0 0 0 3px var(--primary);
}

/* --- Friends List (Left Sidebar) --- */
.friends-list {
    list-style: none;
}

.friends-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.friends-list li img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.friends-list .friend-info {
    flex: 1;
}

.friends-list .friend-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.friends-list .friend-status {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.online-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
}

/* --- Profile Page --- */
.profile-page-header {
    overflow: visible;
}

.profile-cover {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 32px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    border-radius: var(--radius);
}

.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-page-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(65, 195, 195, 0.5);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.avatar-upload-btn {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 32px;
    height: 32px;
    background: #41c3c3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: background 0.2s, transform 0.2s;
}

.avatar-upload-btn:hover {
    background: #35a8a8;
    transform: scale(1.1);
}

/* Avatar source menu */
.avatar-menu-wrapper {
    position: absolute;
    bottom: 2px;
    right: 2px;
}

.avatar-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    padding: 4px;
    min-width: 180px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.2);
    z-index: 10;
}

.avatar-menu.open {
    display: block;
}

.avatar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--dark);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 7px;
    transition: background 0.15s;
    text-decoration: none;
}

.avatar-menu a:hover {
    background: var(--gray-100);
    text-decoration: none;
}

.avatar-menu a i {
    width: 16px;
    text-align: center;
    color: var(--gray-500);
}

/* Passion theme avatar menu */
[data-theme="passion"] .avatar-menu {
    background: #3a3538;
    border-color: rgba(233,30,99,0.12);
}

[data-theme="passion"] .avatar-menu a {
    color: #f5e6f0;
}

[data-theme="passion"] .avatar-menu a:hover {
    background: rgba(255,255,255,0.08);
}

[data-theme="passion"] .avatar-menu a i {
    color: #f06292;
}

/* Avatar confirm modal preview */
.avatar-preview-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.avatar-preview-modal img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.avatar-preview-modal p {
    color: var(--gray-700);
    font-size: 0.9rem;
}

[data-theme="passion"] .avatar-preview-modal img {
    border-color: #e91e63;
}

.profile-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-header-info h1 {
    color: #e4e6eb;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.profile-username {
    color: #838daa;
    font-size: 0.9rem;
}

.profile-account-type {
    color: #41c3c3;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 4px;
}

.profile-account-type i {
    margin-right: 4px;
}

/* Profile form sections */
.profile-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-300);
}

.profile-section:last-of-type {
    border-bottom: none;
    margin-bottom: 16px;
    padding-bottom: 0;
}

.profile-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-section-title::before {
    content: '';
    width: 3px;
    height: 18px;
    background: #41c3c3;
    border-radius: 2px;
}

.profile-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    padding-top: 8px;
}

.profile-form-actions .btn {
    min-width: 200px;
}

#profile-message {
    flex: 1;
}

#profile-message .alert {
    margin-bottom: 0;
}

/* --- GDPR Consent Checkboxes --- */
.gdpr-consents {
    margin-bottom: 20px;
    padding: 16px 0 4px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 0.82rem;
    line-height: 1.4;
}

.consent-check input[type="checkbox"] {
    display: none;
}

.consent-check .checkmark {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    margin-top: 1px;
}

.consent-check input:checked + .checkmark {
    background: #41c3c3;
    border-color: #41c3c3;
}

.consent-check input:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.65rem;
    color: #fff;
}

.consent-check.required span:last-child {
    color: #e4e6eb;
}

.consent-check.optional span:last-child {
    color: #838daa;
}

.consent-check a {
    color: #41c3c3;
    text-decoration: underline;
}

/* Settings page consents (light context) */
.main-layout .consent-check .checkmark {
    border-color: var(--gray-300);
}

.main-layout .consent-check input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.main-layout .consent-check.required span:last-child {
    color: var(--dark);
}

.main-layout .consent-check.optional span:last-child {
    color: var(--gray-700);
}

.main-layout .consent-check a {
    color: var(--primary);
}

.main-layout .consent-check.disabled {
    opacity: 0.6;
    cursor: default;
}

/* Passion theme consents */
[data-theme="passion"] .consent-check .checkmark {
    border-color: rgba(255,255,255,0.15);
}

[data-theme="passion"] .consent-check input:checked + .checkmark {
    background: #e91e63;
    border-color: #e91e63;
}

[data-theme="passion"] .consent-check a,
[data-theme="passion"] .auth-card .consent-check a {
    color: #f06292;
}

[data-theme="passion"] .main-layout .consent-check input:checked + .checkmark {
    background: #e91e63;
    border-color: #e91e63;
}

/* --- Legal Pages (Terms, Privacy) --- */
.legal-page {
    max-width: 700px;
}

.legal-page .legal-updated {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.legal-page .legal-intro {
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.7;
    color: var(--gray-700);
}

.legal-page h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 20px 0 8px;
    color: var(--dark);
}

.legal-page p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--gray-700);
    margin-bottom: 12px;
}

/* Legal pages in auth context (dark) */
.auth-card .legal-page h3 {
    color: #e4e6eb;
}

.auth-card .legal-page p {
    color: #b0b3b8;
}

.auth-card .legal-page .legal-updated {
    color: #838daa;
}

.auth-card .legal-page .legal-intro {
    color: #b0b3b8;
}

/* --- Settings Page --- */
.settings-desc {
    font-size: 0.88rem;
    color: var(--gray-700);
    margin-bottom: 16px;
    line-height: 1.5;
}

.card-danger {
    border: 1px solid rgba(234, 67, 53, 0.2);
}

.card-danger .card-header {
    color: var(--danger);
}

/* Password change section */
.password-change-section {
    margin-top: 16px;
}

.password-form-fields {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--gray-300);
}

.password-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.password-form-actions #password-message {
    flex: 1;
}

.password-form-actions #password-message .alert {
    margin-bottom: 0;
}

/* Profile static field (read-only display) */
.form-control-static {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 18px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 1.25rem;
    font-size: 0.95rem;
    color: var(--dark);
    font-weight: 600;
}

.form-control-static .form-hint {
    margin-left: auto;
    color: var(--gray-500);
    font-size: 0.75rem;
}

/* Profile page textarea */
.profile-section textarea.form-control {
    resize: vertical;
    min-height: 80px;
    border-radius: 12px;
}

/* Profile page select */
/* Profile select - inherits global select styling */

@media (max-width: 768px) {
    .profile-cover {
        flex-direction: column;
        text-align: center;
        padding: 24px 16px;
    }

    .profile-header-info {
        align-items: center;
    }

    .profile-header-info h1 {
        font-size: 1.25rem;
    }

    .profile-page-avatar {
        width: 80px;
        height: 80px;
    }

    .profile-form-actions {
        flex-direction: column;
    }

    .profile-form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .profile-section .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* --- Breadcrumbs --- */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 4px;
    margin-bottom: 12px;
    font-size: 0.82rem;
    flex-wrap: wrap;
}

.bc-item {
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

a.bc-item:hover {
    color: var(--primary);
    text-decoration: none;
}

[data-theme="passion"] a.bc-item:hover {
    color: #f06292;
}

.bc-item i {
    font-size: 0.75rem;
}

.bc-current {
    color: var(--dark);
    font-weight: 600;
}

.bc-sep {
    color: var(--gray-300);
    font-size: 0.55rem;
}

/* --- Public Profile Page --- */
.profile-mood-display {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #41c3c3;
    font-style: italic;
}

.profile-mood-display i {
    margin-right: 4px;
    font-size: 0.75rem;
}

[data-theme="passion"] .profile-mood-display {
    color: #f06292;
}

.profile-public-actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-public-actions .btn,
.profile-public-actions a.btn,
.profile-public-actions .profile-friend-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 18px;
    font-size: 0.88rem;
}

.profile-friend-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--success);
    color: #fff;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.profile-public-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-public-bio {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--dark);
}

.profile-public-empty {
    color: var(--gray-500);
    font-size: 0.85rem;
    font-style: italic;
}

.profile-public-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-public-details li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.88rem;
}

.profile-public-details li:last-child {
    border-bottom: none;
}

.profile-public-details li i {
    width: 20px;
    text-align: center;
    color: var(--primary);
    font-size: 0.9rem;
}

[data-theme="passion"] .profile-public-details li i {
    color: #e91e63;
}

.profile-public-details li span {
    color: var(--gray-500);
    min-width: 80px;
}

.profile-public-details li strong {
    color: var(--dark);
    margin-left: auto;
}

.profile-interests-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interest-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
}

[data-theme="passion"] .interest-tag {
    background: rgba(233,30,99,0.1);
    color: #f06292;
}

@media (max-width: 480px) {
    .profile-public-actions {
        flex-direction: column;
    }

    .profile-public-actions .btn,
    .profile-public-actions a.btn {
        width: 100%;
    }

    .profile-public-details li span {
        min-width: 60px;
    }
}

/* --- Create Post --- */
.create-post {
    padding: 16px;
}

.create-post-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.create-post-top img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.create-post-top textarea {
    flex: 1;
    border: none;
    resize: none;
    font-size: 1rem;
    font-family: inherit;
    padding: 8px;
    background: var(--gray-100);
    border-radius: 20px;
    min-height: 44px;
    max-height: 200px;
    padding: 10px 16px;
}

.create-post-top textarea:focus {
    outline: none;
    background: var(--white);
    box-shadow: inset 0 0 0 1px var(--gray-300);
}

.create-post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.create-post-options {
    display: flex;
    gap: 4px;
}

.create-post-options button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--gray-700);
    font-size: 0.9rem;
    font-family: inherit;
    transition: background 0.2s;
}

.create-post-options button:hover {
    background: var(--gray-100);
}

.create-post-options button i {
    font-size: 1.1rem;
}

.create-post-options .opt-photo i { color: var(--success); }
.create-post-options .opt-video i { color: var(--danger); }
.create-post-options .opt-event i { color: var(--warning); }

/* --- Post Feed --- */
.post {
    margin-bottom: 16px;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.post-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-header .post-author {
    font-weight: 600;
}

.post-header .post-time {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.post-content {
    padding: 0 16px 12px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.post-media {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.post-stats {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    color: var(--gray-500);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--gray-100);
}

.post-actions {
    display: flex;
    padding: 4px 8px;
}

.post-actions button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--gray-700);
    font-weight: 500;
    font-family: inherit;
    transition: background 0.2s;
}

.post-actions button:hover {
    background: var(--gray-100);
}

.post-actions button.liked {
    color: var(--primary);
}

/* --- Right Sidebar --- */
.widget {
    margin-bottom: 16px;
}

.widget-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.event-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.event-item:hover {
    background: var(--gray-100);
}

.event-date-badge {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.event-date-badge .month {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
}

.event-date-badge .day {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.event-info .event-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.event-info .event-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* --- Suggested Friends --- */
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
}

.suggestion-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.suggestion-info {
    flex: 1;
}

.suggestion-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.suggestion-mutual {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* --- Dropdown Menu --- */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 8px 0;
    display: none;
    z-index: 1001;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--dark);
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: var(--gray-100);
    text-decoration: none;
}

.dropdown-menu hr {
    border: none;
    border-top: 1px solid var(--gray-100);
    margin: 4px 0;
}

/* --- Modal System --- */
.sw-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sw-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.sw-modal {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px 28px 24px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 16px 50px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.sw-modal-overlay.active .sw-modal {
    transform: scale(1);
}

.sw-modal-icon {
    font-size: 2.5rem;
    margin-bottom: 14px;
    line-height: 1;
}

.sw-modal-icon.icon-error {
    color: var(--danger);
}

.sw-modal-icon.icon-success {
    color: var(--success);
}

.sw-modal-icon.icon-warning {
    color: var(--warning);
}

.sw-modal-icon.icon-info {
    color: var(--primary);
}

.sw-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.sw-modal-message {
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.5;
    margin-bottom: 22px;
    word-break: break-word;
}

.sw-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.sw-modal-actions .btn {
    min-width: 100px;
    border-radius: 8px;
    font-size: 0.9rem;
    padding: 10px 20px;
}

/* Dark context modal (auth page) */
.auth-page .sw-modal {
    background: #2a2a3e;
    border: 1px solid rgba(255,255,255,0.08);
}

.auth-page .sw-modal-title {
    color: #e4e6eb;
}

.auth-page .sw-modal-message {
    color: #b0b3b8;
}

.auth-page .sw-modal-actions .btn-outline {
    border-color: rgba(255,255,255,0.15);
    color: #b0b3b8;
}

.auth-page .sw-modal-actions .btn-outline:hover {
    background: rgba(255,255,255,0.08);
}

@media (max-width: 480px) {
    .sw-modal {
        padding: 24px 20px 20px;
        border-radius: 14px;
    }

    .sw-modal-actions {
        flex-direction: column;
    }

    .sw-modal-actions .btn {
        width: 100%;
    }
}

/* --- Friends Page --- */
.friends-search-bar {
    margin-bottom: 16px;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

.friend-item:last-child {
    border-bottom: none;
}

.friend-avatar {
    position: relative;
    flex-shrink: 0;
}

.friend-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.friend-avatar .online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    border: 2px solid var(--card-bg);
}

.friend-item .friend-info {
    flex: 1;
    min-width: 0;
}

.friend-item .friend-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.friend-item .friend-meta {
    font-size: 0.78rem;
    color: var(--gray-500);
    margin-top: 1px;
}

.friend-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pending-label {
    font-size: 0.78rem;
    color: var(--gray-500);
}

.friends-empty {
    text-align: center;
    padding: 30px 20px;
    color: var(--gray-500);
}

.friends-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
    opacity: 0.3;
}

/* Friends view toggle */
.friends-view-toggle {
    display: flex;
    gap: 4px;
}

.view-toggle-btn {
    background: none;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    color: var(--gray-500);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.view-toggle-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

[data-theme="passion"] .view-toggle-btn.active {
    background: #e91e63;
    border-color: #e91e63;
}

/* Grid view */
.friends-container.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.friends-container.grid-view .friend-item {
    flex-direction: column;
    text-align: center;
    padding: 20px 12px;
    border-bottom: none;
    background: var(--gray-100);
    border-radius: var(--radius);
    gap: 8px;
}

[data-theme="passion"] .friends-container.grid-view .friend-item {
    background: rgba(255, 255, 255, 0.05);
}

.friends-container.grid-view .friend-avatar img {
    width: 72px;
    height: 72px;
}

.friends-container.grid-view .friend-info {
    text-align: center;
}

.friends-container.grid-view .friend-actions {
    flex-direction: column;
    width: 100%;
    gap: 6px;
}

.friends-container.grid-view .friend-actions .btn {
    width: 100%;
    justify-content: center;
}

@media (max-width: 480px) {
    .friend-actions {
        flex-direction: column;
        gap: 4px;
    }

    .friend-actions .btn {
        font-size: 0.75rem;
        padding: 5px 8px;
    }

    .friends-container.grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .friends-container.grid-view .friend-actions .btn {
        font-size: 0.72rem;
        padding: 4px 6px;
    }
}

/* --- Custom Date Picker --- */
.sw-datepicker {
    position: relative;
}

.sw-dp-input {
    cursor: pointer !important;
    padding-right: 44px !important;
}

.sw-dp-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    pointer-events: none;
    font-size: 0.95rem;
}

.sw-dp-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1050;
    background: var(--card-bg);
    border: 1px solid var(--gray-300);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.18);
    padding: 14px;
    width: 300px;
    user-select: none;
    -webkit-user-select: none;
}

.sw-dp-dropdown.open {
    display: block;
}

/* Header: month/year selectors */
.sw-dp-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.sw-dp-nav {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    font-size: 0.75rem;
    transition: background 0.15s;
    flex-shrink: 0;
}

.sw-dp-nav:hover {
    background: var(--gray-300);
}

.sw-dp-selectors {
    display: flex;
    flex: 1;
    gap: 6px;
}

.sw-dp-selectors select {
    flex: 1;
    padding: 5px 6px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
    color: var(--dark);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
}

.sw-dp-selectors select:focus {
    border-color: #41c3c3;
}

/* Days grid */
.sw-dp-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}

.sw-dp-days-header span {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-500);
    padding: 4px 0;
    text-transform: uppercase;
}

.sw-dp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.sw-dp-day {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    border: none;
    background: none;
    border-radius: 50%;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--dark);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    padding: 0;
}

.sw-dp-day:hover {
    background: var(--gray-100);
}

.sw-dp-day.other-month {
    color: var(--gray-500);
    opacity: 0.4;
}

.sw-dp-day.today {
    font-weight: 700;
    box-shadow: inset 0 0 0 2px #41c3c3;
}

.sw-dp-day.selected {
    background: #41c3c3;
    color: #fff;
    font-weight: 600;
}

.sw-dp-day.disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

/* Footer: today & clear */
.sw-dp-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
}

.sw-dp-footer button {
    border: none;
    background: none;
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.15s;
}

.sw-dp-footer .sw-dp-today-btn {
    color: #41c3c3;
}

.sw-dp-footer .sw-dp-today-btn:hover {
    background: rgba(65,195,195,0.1);
}

.sw-dp-footer .sw-dp-clear-btn {
    color: var(--danger);
}

.sw-dp-footer .sw-dp-clear-btn:hover {
    background: rgba(234,67,53,0.08);
}

/* Responsive */
@media (max-width: 480px) {
    .sw-dp-dropdown {
        width: calc(100vw - 40px);
        max-width: 300px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* --- Mobile Menu Hamburger Button --- */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    cursor: pointer;
    color: #b0b3b8;
    font-size: 1.2rem;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.15);
    color: #e4e6eb;
}

/* --- Mobile Sidebar Overlay --- */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
}

/* --- Mobile Bottom Navigation Bar --- */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--white);
    box-shadow: 0 -1px 3px rgba(0,0,0,0.1);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: var(--gray-500);
    font-size: 0.65rem;
    gap: 2px;
    text-decoration: none;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav a i {
    font-size: 1.2rem;
}

.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover {
    color: var(--primary);
    text-decoration: none;
}

.mobile-bottom-nav a .badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 16px);
    background: var(--danger);
    color: var(--white);
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* --- Mobile Search (Full Width Overlay) --- */
.mobile-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--white);
    z-index: 2000;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
    box-shadow: var(--shadow);
}

.mobile-search-overlay.active {
    display: flex;
}

.mobile-search-overlay input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    font-size: 1rem;
    font-family: inherit;
}

.mobile-search-overlay input:focus {
    outline: none;
    border-color: var(--primary);
}

.mobile-search-overlay .close-search {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    font-size: 1.2rem;
    color: var(--gray-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

/* --- Touch-friendly global adjustments --- */
@media (pointer: coarse) {
    .btn, .nav-menu li a, .post-actions button, .header-nav-item,
    .create-post-options button, .dropdown-menu a {
        min-height: 44px;
    }

    .form-control {
        min-height: 44px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* --- Tablet Landscape & Small Desktop (<=1200px) --- */
@media (max-width: 1200px) {
    .sidebar-right {
        display: none;
    }
    .main-content {
        margin-right: 0;
        max-width: calc(100% - var(--sidebar-width));
    }
}

/* --- Tablet Portrait (<=992px) --- */
@media (max-width: 992px) {
    :root {
        --sidebar-width: 240px;
    }

    .header-search input {
        width: 200px;
    }

    .header-search input:focus {
        width: 240px;
    }

    .header-user span {
        display: none;
    }
}

/* --- Mobile (<=768px) --- */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }

    /* Show hamburger */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Show bottom nav */
    .mobile-bottom-nav {
        display: flex;
    }

    /* Hide desktop header nav icons (moved to bottom nav) */
    .header-nav-item {
        display: none;
    }

    /* Hide desktop search (replaced by mobile search) */
    .header-search {
        display: none;
    }

    /* Add mobile search button to header */
    .mobile-search-btn {
        display: flex !important;
    }

    /* Header adjustments */
    .main-header {
        padding: 0 12px;
    }

    .header-logo-img {
        height: 28px;
    }

    .header-user span {
        display: none;
    }

    .header-user .fa-caret-down {
        display: none;
    }

    /* Left sidebar becomes slide-in drawer */
    .sidebar-left {
        position: fixed;
        top: 0;
        left: -100%;
        width: var(--sidebar-width);
        height: 100vh;
        z-index: 2000;
        background: var(--white);
        padding: 16px;
        padding-top: 20px;
        transition: left 0.3s ease;
        box-shadow: none;
        overflow-y: auto;
    }

    .sidebar-left.open {
        left: 0;
        box-shadow: 4px 0 15px rgba(0,0,0,0.15);
    }

    .sidebar-right {
        display: none;
    }

    /* Main content fills full width */
    .main-content {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        padding: 12px;
        padding-bottom: 72px; /* Space for bottom nav */
    }

    /* Mobile overlay is functional */
    .mobile-overlay.active {
        display: block;
    }

    /* Auth page mobile */
    .auth-page {
        min-height: 100dvh;
        padding: 16px;
    }

    .auth-header-logo {
        height: 30px;
    }

    .auth-card {
        padding: 28px 22px 24px;
        border-radius: 16px;
    }

    /* Post adjustments */
    .create-post-options button span {
        display: none;
    }

    .post-actions button span {
        display: none;
    }

    .post-actions button {
        gap: 0;
    }

    .post-actions button i {
        font-size: 1.2rem;
    }

    /* Dropdown fullscreen on mobile */
    .dropdown-menu {
        position: fixed;
        top: var(--header-height);
        right: 8px;
        left: 8px;
        width: auto;
        min-width: unset;
        border-radius: var(--radius-lg);
    }

    /* Profile card compact */
    .profile-card .avatar {
        width: 64px;
        height: 64px;
    }
}

/* --- Small Mobile (<=480px) --- */
@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .auth-page {
        padding: 12px;
    }

    .auth-logo {
        margin-bottom: 18px;
    }

    .auth-logo-img {
        max-width: 200px;
    }

    .auth-header-logo {
        height: 26px;
    }

    .auth-card {
        padding: 24px 16px 20px;
        border-radius: 14px;
    }

    .auth-card h2 {
        font-size: 1.15rem;
        margin-bottom: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .main-content {
        padding: 8px;
        padding-bottom: 68px;
    }

    .create-post {
        padding: 12px;
    }

    .create-post-top img {
        width: 32px;
        height: 32px;
    }

    .post-header {
        padding: 10px 12px;
    }

    .post-content {
        padding: 0 12px 10px;
    }

    .post-stats {
        padding: 6px 12px;
    }

    .card {
        border-radius: 0;
        margin-left: -8px;
        margin-right: -8px;
        box-shadow: none;
        border-bottom: 1px solid var(--gray-100);
    }

    /* Sidebar drawer wider on small screens */
    .sidebar-left {
        width: 85vw;
        max-width: 300px;
    }
}

/* --- Safe area for notched phones (iPhone X+) --- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-bottom-nav {
        height: calc(56px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
    }

    @media (max-width: 768px) {
        .main-content {
            padding-bottom: calc(72px + env(safe-area-inset-bottom));
        }
    }
}

/* --- Landscape phone adjustments --- */
@media (max-height: 500px) and (max-width: 900px) {
    .auth-page {
        padding: 10px;
        align-items: flex-start;
        overflow-y: auto;
    }

    .auth-logo {
        margin-bottom: 12px;
    }

    .auth-logo-img {
        max-width: 160px;
    }

    .auth-header-logo {
        height: 24px;
    }

    .mobile-bottom-nav {
        height: 44px;
    }

    .mobile-bottom-nav a {
        font-size: 0;
    }

    .mobile-bottom-nav a i {
        font-size: 1.1rem;
    }
}

/* ===== Notifications Page ===== */

.notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-unread {
    background: rgba(65, 195, 195, 0.06);
    margin: 0 -16px;
    padding: 14px 16px;
    border-radius: 8px;
}

[data-theme="passion"] .notif-unread {
    background: rgba(233, 30, 99, 0.06);
}

.notif-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.notif-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-text {
    font-size: 0.93rem;
    color: var(--text);
    line-height: 1.4;
}

.notif-name {
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

a.notif-name:hover {
    text-decoration: underline;
}

.notif-time {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 2px;
}

.notif-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.notif-icon-danger {
    background: #e53935;
}

.notif-warning-text {
    color: #e53935;
    font-weight: 500;
}
