/*
Theme Name: Taxdila Cargo
Theme URI: https://taxdilacargo.com
Author: Taxdila Cargo Team
Author URI: https://taxdilacargo.com
Description: A clean and lightweight custom theme for Taxdila Cargo.
Version: 1.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: taxdilacargo
Tags: custom, clean, responsive, minimal
*/

/* CSS Variables for consistent theming */
:root {
    /* Brand Color Palette */
    --science-blue: #0a66c2;
    --trendy-green: #83941f;
    --tulip-tree: #f8c630;
    --geraldine: #f5987e;
    --blue-bayoux: #56687a;
    --congress-blue: #004182;
    --chalet-green: #44712e;
    --rusty-nail: #e29a00;
    --roof-terracotta: #b24020;
    --limed-spruce: #38434f;
    --botticelli: #dce6f1;
    --zanah: #d7ebce;
    --banana-mania: #fce2ba;
    --champagne: #fadfd8;
    --pampas: #e9e5df;
    --linen: #fdfaf5;

    /* New color palette with yellow-orange gradient */
    --primary-gradient: linear-gradient(90deg, #f8c630 0%, #e29a00 100%);
    --primary-color: #f8c630;
    --secondary-color: #e29a00;
    
    /* Light Theme */
    --background: #fffff3;
    --foreground: #333333;
    --card: #ffffff;
    --card-foreground: #333333;
    --header: #ffffff;
    --border: #dddddd;
    --accent: #f5f5f5;
    --muted-foreground: #666666;
    --primary: #f8c630;
    --secondary: #e29a00;
    --placeholder: #cccccc;
    --inactive: #e6e6e6;
    --toggle-inactive: #d1d5db;
    --accent-color: #6a3c9e; /* More vibrant purple */
}

body.dark-mode {
    /* Dark Theme */
    --background: #000000;
    --foreground: #ffffff;
    --card: #1c1c1e;
    --card-foreground: #ffffff;
    --header: #1a1a1a;
    --border: #333333;
    --accent: #333333;
    --muted-foreground: #888888;
    --primary: #f8c630;
    --secondary: #e29a00;
    --placeholder: #38383a;
    --inactive: #2c2c2e;
    --toggle-inactive: #4b5563;
    --primary-gradient: linear-gradient(90deg, #f8c630 0%, #e29a00 100%);
    --accent-color: #6a3c9e; /* More vibrant purple for dark mode */
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Open Sans', Inter, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    background: var(--background);
    color: var(--foreground);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main content area */
.site-content {
    min-height: calc(100vh - 100px);
    padding: 20px;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary);
}

/* Profile Layout Styles - Responsive flex in one row */
.profile-responsive-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    width: 100%;
}

.profile-avatar-container {
    flex-shrink: 0;
}

.profile-info-container {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--foreground);
}

.profile-username {
    font-size: 16px;
    color: var(--muted-foreground);
    margin: 0 0 12px 0;
}

.profile-bio {
    font-size: 16px;
    color: var(--foreground);
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.edit-profile-btn-container {
    margin-top: 16px;
}

.edit-profile-btn {
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-profile-btn:hover {
    background: #5a3a7a;
}

/* FIXED: Stats buttons layout - Responsive flex in ONE ROW, different columns */
.stats-row-layout {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    width: 100%;
    margin: 20px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
}

.stats-row-layout::-webkit-scrollbar {
    height: 4px;
}

.stats-row-layout::-webkit-scrollbar-track {
    background: var(--accent);
}

.stats-row-layout::-webkit-scrollbar-thumb {
    background: var(--muted-foreground);
    border-radius: 2px;
}

.stat-btn {
    flex: 1;
    min-width: 100px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.stat-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-number {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--muted-foreground);
    text-transform: capitalize;
    font-weight: 500;
    line-height: 1.2;
}

/* Header Styles */
.custom-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: var(--header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    z-index: 1500;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.custom-header .logo img {
    height: 25px;
    width: auto;
    display: block;
}

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

.settings-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--foreground);
}

.settings-icon:hover {
    background: var(--accent);
}

.settings-icon svg {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
}

/* Footer Styles */
.custom-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--card);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1500;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    border-top: 1px solid var(--border);
    padding: 8px 0;
}

.footer-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--muted-foreground);
    position: relative;
    text-decoration: none;
    min-height: 44px;
    height: auto;
    border-radius: 8px;
}

.footer-tab:hover {
    color: var(--primary);
    background: transparent;
}

.footer-tab:hover .footer-profile-avatar {
    border-color: var(--primary);
}

.footer-tab.active {
    color: var(--primary);
}

.footer-tab.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

.footer-tab svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
    transition: all 0.3s ease;
    margin-bottom: 2px;
}

.footer-tab span {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}

.footer-profile-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--muted-foreground);
    transition: all 0.3s ease;
    margin-bottom: 2px;
}

.footer-tab.active .footer-profile-avatar {
    border-color: var(--primary);
}

.footer-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.logged-in-body {
    padding-top: 50px;
    padding-bottom: 60px;
}

/* Main Content Styles */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: var(--background);
    color: var(--foreground);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.content-article {
    background: var(--card);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.content-article:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.article-title {
    color: var(--foreground);
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.entry-content {
    line-height: 1.6;
    font-size: 1.1rem;
}

.entry-content p {
    margin-bottom: 1.5rem;
    color: var(--muted-foreground);
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: var(--foreground);
    margin: 2rem 0 1rem 0;
    font-weight: 600;
    line-height: 1.3;
}

.entry-content h1 {
    font-size: 2rem;
}

.entry-content h2 {
    font-size: 1.75rem;
}

.entry-content h3 {
    font-size: 1.5rem;
}

.entry-content h4 {
    font-size: 1.25rem;
}

.entry-content h5 {
    font-size: 1.1rem;
}

.entry-content h6 {
    font-size: 1rem;
}

.entry-content a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.entry-content a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.entry-content ul,
.entry-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
    color: var(--muted-foreground);
}

.entry-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--muted-foreground);
    background: var(--accent);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.entry-content th,
.entry-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.entry-content th {
    background: var(--accent);
    font-weight: 600;
    color: var(--foreground);
}

.entry-content tr:hover {
    background: var(--accent);
}

.no-content {
    text-align: center;
    padding: 60px 30px;
}

.no-content .article-title {
    color: var(--muted-foreground);
    margin-bottom: 16px;
}

.no-content .entry-content p {
    font-size: 1.2rem;
    color: var(--muted-foreground);
}

/* Settings Modal Styles */
.settings-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.settings-modal-container {
    width: 100%;
    height: 100%;
    background: var(--background);
    color: var(--foreground);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-modal-container.modal-open {
    transform: translateX(0);
}

.settings-modal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--header);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 56px;
}

.settings-back-btn {
    background: none;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.settings-back-btn:hover {
    background: var(--accent);
}

.settings-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-align: center;
    flex: 1;
    color: var(--foreground);
}

.settings-header-spacer {
    width: 40px;
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    -webkit-overflow-scrolling: touch;
}

.settings-sections {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Reduced gap between sections */
    padding: 0 16px;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Main section title - outside cards */
.section-main-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted-foreground);
    padding: 0 16px 8px 16px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--background);
    position: relative;
    z-index: 2;
}

.settings-items {
    background: var(--card);
    border-radius: 16px;
    overflow: hidden;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: transparent;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid var(--border);
    min-height: 56px;
}

.settings-item:hover {
    background: var(--accent);
}

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

.item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.item-icon {
    color: var(--muted-foreground);
    flex-shrink: 0;
}

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

.item-label {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.item-chevron {
    color: var(--muted-foreground);
    flex-shrink: 0;
    transform: rotate(180deg);
}

.logout-item .item-label {
    color: var(--primary);
}

.logout-item .item-icon {
    color: var(--primary);
}

/* REMOVED: settings-company-logo - No logo at bottom */
/* REMOVED: .company-logo */

/* Scrollbar Styling */
.settings-content::-webkit-scrollbar,
.profile-content::-webkit-scrollbar,
.notifications-content::-webkit-scrollbar,
.view-user-profile-content::-webkit-scrollbar {
    width: 4px;
}

.settings-content::-webkit-scrollbar-track,
.profile-content::-webkit-scrollbar-track,
.notifications-content::-webkit-scrollbar-track,
.view-user-profile-content::-webkit-scrollbar-track {
    background: var(--accent);
}

.settings-content::-webkit-scrollbar-thumb,
.profile-content::-webkit-scrollbar-thumb,
.notifications-content::-webkit-scrollbar-thumb,
.view-user-profile-content::-webkit-scrollbar-thumb {
    background: var(--muted-foreground);
    border-radius: 2px;
}

.settings-content::-webkit-scrollbar-thumb:hover,
.profile-content::-webkit-scrollbar-thumb:hover,
.notifications-content::-webkit-scrollbar-thumb:hover,
.view-user-profile-content::-webkit-scrollbar-thumb:hover {
    background: var(--foreground);
}

/* Hide scrollbar for mobile */
@media (max-width: 768px) {
    .settings-content,
    .profile-content,
    .notifications-content,
    .view-user-profile-content {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .settings-content::-webkit-scrollbar,
    .profile-content::-webkit-scrollbar,
    .notifications-content::-webkit-scrollbar,
    .view-user-profile-content::-webkit-scrollbar {
        display: none;
    }
}

/* Follow Modal Styles */
.follow-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.follow-modal-container {
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    background: var(--card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.follow-modal-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    position: relative;
}

.follow-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--foreground);
}

.follow-modal-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    padding: 4px;
}

.follow-modal-content {
    max-height: 60vh;
    overflow-y: auto;
    padding: 8px 0;
}

.follow-user-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background-color 0.3s;
}

.follow-user-item:hover {
    background: var(--accent);
}

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

.follow-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}

.follow-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.follow-user-info {
    flex: 1;
}

.follow-user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 2px;
}

.follow-user-username {
    font-size: 14px;
    color: var(--muted-foreground);
}

.no-users-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted-foreground);
}

.loading-users {
    text-align: center;
    padding: 20px;
    color: var(--muted-foreground);
}

/* Notifications Modal Styles */
.notifications-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.notifications-modal-container {
    width: 100%;
    height: 100%;
    background: var(--background);
    color: var(--foreground);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notifications-modal-container.modal-open {
    transform: translateX(0);
}

.notifications-modal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--header);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 56px;
}

.notifications-back-btn {
    background: none;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.notifications-back-btn:hover {
    background: var(--accent);
}

.notifications-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-align: center;
    flex: 1;
    color: var(--foreground);
}

.notifications-header-spacer {
    width: 40px;
}

.notifications-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    -webkit-overflow-scrolling: touch;
}

/* Notifications Specific Styles */
.notifications-container {
    padding: 0 16px;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 20px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.notification-item:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.notification-item.unread {
    background: var(--accent);
    border-left: 3px solid #DC1E25;
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    border: 1px solid var(--border);
}

.notification-icon svg {
    width: 20px;
    height: 20px;
}

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

.notification-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--foreground);
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.notification-message {
    font-size: 14px;
    color: var(--muted-foreground);
    line-height: 1.4;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 12px;
    color: var(--muted-foreground);
    font-weight: 500;
}

.notification-dot {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #DC1E25;
}

.loading-notifications {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted-foreground);
    font-size: 16px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--accent);
    border-left: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-notifications {
    text-align: center;
    padding: 80px 20px;
    color: var(--muted-foreground);
}

.no-notifications-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--muted-foreground);
}

.no-notifications h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--foreground);
}

.no-notifications p {
    font-size: 14px;
    margin: 0;
    color: var(--muted-foreground);
}

/* Custom Avatar Styles */
.taxdilacargo-custom-avatar {
    border-radius: 50%;
    background: var(--accent-color);
}

/* Theme mode transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Button Styles */
.btn {
    border: none;
    border-radius: 15px;
    padding: 0 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    font-size: 14px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    white-space: nowrap;
    min-width: 0;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-action-primary {
    background: var(--primary-gradient);
    color: white;
    border: 1px solid var(--primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-action-primary:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-action-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-action-follow {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.btn-action-follow:hover {
    background: rgba(248, 198, 48, 0.1);
    border-color: var(--secondary);
    color: var(--secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-action-follow.following {
    background: var(--muted-foreground);
    color: var(--foreground);
    border-color: var(--muted-foreground);
    font-weight: 600;
}

.btn-action-follow.following:hover {
    background: var(--roof-terracotta);
    color: white;
    border-color: var(--roof-terracotta);
}

.btn-nav {
    background: transparent;
    color: var(--muted-foreground);
    border: none;
    border-radius: 0;
    padding: 0 12px;
    position: relative;
    font-weight: 400;
    font-size: 14px;
}

.btn-nav:hover {
    color: var(--foreground);
    background: transparent;
}

.btn-nav.active {
    color: var(--primary);
    font-weight: 600;
}

.btn-nav.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.btn-filter {
    background: transparent;
    color: var(--muted-foreground);
    border: none;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
}

.btn-filter:hover {
    color: var(--foreground);
    background: var(--accent);
}

.btn-filter.active {
    color: var(--primary);
    background: rgba(248, 198, 48, 0.1);
    font-weight: 600;
}

.btn-cancel {
    background: transparent;
    color: #DC1E25;
    border: 1px solid #DC1E25;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    height: 30px;
    line-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
    max-width: none;
    padding: 0 24px;
}

.btn-cancel:hover {
    background: rgba(220, 30, 37, 0.1);
    color: #b3191f;
}

.btn-save {
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    padding: 0 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
    height: 30px;
    line-height: 30px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-save:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-save:disabled {
    background: var(--muted-foreground);
    cursor: not-allowed;
}

.btn-icon {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-text {
    background: transparent;
    color: var(--primary);
    border: none;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
}

.btn-text:hover {
    background: rgba(248, 198, 48, 0.1);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
}

.btn-outline:hover {
    background: rgba(248, 198, 48, 0.1);
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 8px;
}

/* Color Utility Classes */
.bg-science-blue { background-color: var(--science-blue); }
.bg-trendy-green { background-color: var(--trendy-green); }
.bg-tulip-tree { background-color: var(--tulip-tree); }
.bg-geraldine { background-color: var(--geraldine); }
.bg-blue-bayoux { background-color: var(--blue-bayoux); }
.bg-congress-blue { background-color: var(--congress-blue); }
.bg-chalet-green { background-color: var(--chalet-green); }
.bg-rusty-nail { background-color: var(--rusty-nail); }
.bg-roof-terracotta { background-color: var(--roof-terracotta); }
.bg-limed-spruce { background-color: var(--limed-spruce); }
.bg-botticelli { background-color: var(--botticelli); }
.bg-zanah { background-color: var(--zanah); }
.bg-banana-mania { background-color: var(--banana-mania); }
.bg-champagne { background-color: var(--champagne); }
.bg-pampas { background-color: var(--pampas); }
.bg-linen { background-color: var(--linen); }

.text-science-blue { color: var(--science-blue); }
.text-trendy-green { color: var(--trendy-green); }
.text-tulip-tree { color: var(--tulip-tree); }
.text-geraldine { color: var(--geraldine); }
.text-blue-bayoux { color: var(--blue-bayoux); }
.text-congress-blue { color: var(--congress-blue); }
.text-chalet-green { color: var(--chalet-green); }
.text-rusty-nail { color: var(--rusty-nail); }
.text-roof-terracotta { color: var(--roof-terracotta); }
.text-limed-spruce { color: var(--limed-spruce); }

/* Global Scrollbar Removal */
html, body {
    -ms-overflow-style: none;
    scrollbar-width: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    display: none;
}

/* Mobile-specific fixes */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }
    
    .desktop-only {
        display: none;
    }
    
    .btn,
    .btn-action-primary,
    .btn-action-follow,
    .btn-nav,
    .btn-filter,
    .btn-cancel,
    .btn-save,
    .btn-text,
    .btn-outline,
    .btn-icon {
        height: 30px !important;
        min-height: 30px !important;
        max-height: 30px !important;
        font-size: 14px !important;
    }
    
    .btn-icon {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
    }
    
    /* Prevent zoom on input focus for iOS */
    input, select, textarea {
        font-size: 16px !important;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none;
    }
}

/* Ensure no backgrounds on icons */
svg, [class*="icon"], [class*="Icon"] {
    background-color: transparent !important;
    color: inherit;
}

/* Scrollbar Hidden Utility */
.scrollbar-hidden {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hidden::-webkit-scrollbar {
    display: none;
}

/* Mobile viewport and scaling fixes */
@supports (-webkit-touch-callout: none) {
    /* CSS specific to iOS devices */
    body {
        -webkit-font-smoothing: antialiased;
        -webkit-overflow-scrolling: touch;
    }
}

/* Force consistent sizing on all elements */
* {
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Card Styles */
.settings-card {
    background: var(--card);
    border-radius: 16px;
    border: none;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.settings-card:last-child {
    margin-bottom: 0;
}

.card-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.card-content {
    padding: 0;
}

.list-item {
    background: var(--card);
    padding: 16px;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
}

.list-item:hover {
    background: var(--accent);
}

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

.section-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* Display Settings Specific Styles */
.section-title-small {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.theme-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background-color 0.3s;
    min-height: 56px;
}

.theme-option:hover {
    background: var(--accent);
}

.theme-option:last-child {
    border-bottom: none;
}

.theme-option-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-icon {
    color: var(--card-foreground);
    flex-shrink: 0;
}

.theme-label {
    font-size: 17px;
    font-weight: 500;
    color: var(--card-foreground);
}

/* Theme Toggle Styles */
.theme-toggle {
    width: 48px;
    height: 28px;
    border-radius: 14px;
    background: var(--toggle-inactive);
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.theme-toggle.checked {
    background: var(--primary-gradient);
}

.theme-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--card);
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.theme-toggle.checked::after {
    transform: translateX(20px);
}

.theme-toggle-medium {
    width: 48px;
    height: 28px;
}

.theme-toggle-medium::after {
    width: 20px;
    height: 20px;
}

.theme-toggle-medium.checked::after {
    transform: translateX(20px);
}

/* Switch Toggle Styles */
.switch-toggle {
    width: 48px;
    height: 28px;
    border-radius: 14px;
    background: var(--toggle-inactive);
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

.switch-toggle.checked {
    background: var(--primary-gradient);
}

.switch-track {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    position: relative;
}

.switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--card);
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch-toggle.checked .switch-thumb {
    transform: translateX(20px);
}

/* Profile Modal Specific Styles */
.profile-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.profile-modal-container {
    width: 100%;
    height: 100%;
    background: var(--background);
    color: var(--foreground);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-modal-container.modal-open {
    transform: translateX(0);
}

.profile-modal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--header);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 56px;
}

.profile-back-btn {
    background: none;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.profile-back-btn:hover {
    background: var(--accent);
}

.profile-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-align: center;
    flex: 1;
    color: var(--foreground);
}

.profile-header-spacer {
    width: 40px;
}

.profile-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    -webkit-overflow-scrolling: touch;
}

/* Profile Modal Specific Styles */
.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 16px;
}

.profile-header-section {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--foreground);
}

.profile-username {
    font-size: 14px;
    color: var(--muted-foreground);
    margin: 0 0 8px 0;
}

.profile-bio {
    font-size: 14px;
    color: var(--muted-foreground);
    line-height: 1.4;
    margin: 0;
    white-space: pre-line;
    word-wrap: break-word;
}

.edit-profile-btn {
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    height: 30px;
    line-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-profile-btn:hover {
    background: #5a3a7a;
}

.profile-stats-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

/* FIXED: Using stats-row-layout for horizontal stats */
.profile-actions-section {
    padding: 20px 0;
}

.action-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--card);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.action-item:hover {
    background: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-icon {
    color: var(--muted-foreground);
    margin-right: 12px;
    flex-shrink: 0;
}

.action-label {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: var(--foreground);
}

.action-count {
    font-size: 14px;
    color: var(--muted-foreground);
    margin-right: 8px;
}

.action-chevron {
    color: var(--muted-foreground);
    flex-shrink: 0;
    transform: rotate(180deg);
}

/* View User Profile Modal Styles */
.view-user-profile-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.view-user-profile-modal-container {
    width: 100%;
    height: 100%;
    background: var(--background);
    color: var(--foreground);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-user-profile-modal-container.modal-open {
    transform: translateX(0);
}

.view-user-profile-modal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.view-user-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--header);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 56px;
}

.view-user-profile-back-btn {
    background: none;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.view-user-profile-back-btn:hover {
    background: var(--accent);
}

.view-user-profile-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-align: center;
    flex: 1;
    color: var(--foreground);
}

.view-user-profile-header-spacer {
    width: 40px;
}

.view-user-profile-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    -webkit-overflow-scrolling: touch;
}

.view-user-profile-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 16px;
}

.view-user-profile-header-section {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.view-user-profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.view-user-profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.view-user-profile-info {
    flex: 1;
}

.view-user-profile-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--foreground);
}

.view-user-profile-username {
    font-size: 14px;
    color: var(--muted-foreground);
    margin: 0 0 8px 0;
}

.view-user-profile-bio {
    font-size: 14px;
    color: var(--muted-foreground);
    line-height: 1.4;
    margin: 0 0 8px 0;
    white-space: pre-line;
    word-wrap: break-word;
}

.follow-btn {
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    height: 30px;
    line-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.follow-btn:hover {
    background: #5a3a7a;
}

.follow-btn.following {
    background: var(--muted-foreground);
    color: var(--foreground);
}

.follow-btn.following:hover {
    background: var(--roof-terracotta);
    color: white;
}

.view-user-profile-stats-section {
    padding: 20px 0;
}

.view-user-profile-stat-number {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 4px;
}

.view-user-profile-stat-label {
    font-size: 12px;
    color: var(--muted-foreground);
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

/* Edit Profile Form Styles */
.edit-profile-form-section {
    padding: 20px 0;
}

.edit-profile-form-section .form-group {
    margin-bottom: 20px;
    position: relative;
}

.edit-profile-form-section label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 8px;
}

.char-counter {
    font-size: 12px;
    color: var(--muted-foreground);
    margin-left: 8px;
    font-weight: normal;
}

.edit-profile-form-section input,
.edit-profile-form-section textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--foreground);
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.edit-profile-form-section input:focus,
.edit-profile-form-section textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(106, 60, 158, 0.1);
}

.edit-profile-form-section textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    width: 100%;
}

.cancel-btn {
    background: transparent;
    color: #DC1E25;
    border: 1px solid #DC1E25;
    padding: 0 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    height: 30px;
    line-height: 30px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cancel-btn:hover {
    background: rgba(220, 30, 37, 0.1);
    color: #b3191f;
}

.save-btn {
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    padding: 0 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
    height: 30px;
    line-height: 30px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.save-btn:disabled {
    background: var(--muted-foreground);
    cursor: not-allowed;
}

/* Focus states for accessibility */
.profile-back-btn:focus-visible,
.edit-profile-btn:focus-visible,
.cancel-btn:focus-visible,
.save-btn:focus-visible,
.action-item:focus-visible,
.stat-btn:focus-visible,
.follow-user-item:focus-visible,
.view-user-profile-back-btn:focus-visible,
.follow-btn:focus-visible,
.retry-btn:focus-visible,
.view-user-follow-user-item:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.edit-profile-form-section input:focus-visible,
.edit-profile-form-section textarea:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .custom-header {
        height: 55px;
    }
    
    .settings-icon {
        padding: 10px;
    }
    
    .settings-icon svg {
        width: 22px;
        height: 22px;
    }
    
    body {
        padding-top: 55px;
        <?php echo is_user_logged_in() ? 'padding-bottom: 55px;' : ''; ?>
    }

    .custom-footer {
        height: 65px;
    }

    .footer-tab {
        min-height: 48px;
    }

    .footer-tab span {
        font-size: 11px;
    }

    .logged-in-body {
        padding-top: 55px;
        padding-bottom: 65px;
    }
    
    .main-content {
        padding: 16px;
    }

    .content-article {
        padding: 24px;
    }

    .article-title {
        font-size: 2rem;
    }

    .entry-content {
        font-size: 1rem;
    }

    .entry-content h1 {
        font-size: 1.75rem;
    }

    .entry-content h2 {
        font-size: 1.5rem;
    }

    .entry-content h3 {
        font-size: 1.25rem;
    }

    .entry-content ul,
    .entry-content ol {
        padding-left: 1.5rem;
    }

    .entry-content th,
    .entry-content td {
        padding: 10px 12px;
    }

    .profile-responsive-layout,
    .profile-header-section,
    .view-user-profile-header-section {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    /* FIXED: Stats row layout - horizontal scroll on mobile */
    .stats-row-layout {
        gap: 8px;
        padding: 8px 4px;
    }

    .stat-btn {
        min-width: 90px;
        padding: 10px 6px;
    }

    .profile-avatar-large,
    .view-user-profile-avatar-large {
        align-self: center;
    }

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

    .cancel-btn,
    .save-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
    }

    .content-article {
        padding: 20px;
    }

    .article-title {
        font-size: 1.75rem;
    }

    .entry-content {
        font-size: 0.95rem;
    }

    .entry-content h1 {
        font-size: 1.5rem;
    }

    .entry-content h2 {
        font-size: 1.35rem;
    }

    .entry-content h3 {
        font-size: 1.2rem;
    }

    .entry-content blockquote {
        padding: 1rem;
        margin: 1.5rem 0;
    }

    .profile-header-section,
    .view-user-profile-header-section {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .profile-avatar-large,
    .view-user-profile-avatar-large {
        width: 60px;
        height: 60px;
    }
}

/* Code blocks styling */
.entry-content pre {
    background: var(--accent);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.entry-content code {
    background: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    color: var(--primary);
}

.entry-content pre code {
    background: none;
    padding: 0;
    color: var(--foreground);
}

/* Form elements */
.entry-content input,
.entry-content textarea,
.entry-content select {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--foreground);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.entry-content input:focus,
.entry-content textarea:focus,
.entry-content select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(248, 198, 48, 0.1);
}

/* Button styles */
.entry-content .button,
.entry-content .wp-block-button__link {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.entry-content .button:hover,
.entry-content .wp-block-button__link:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(248, 198, 48, 0.3);
}

/* WordPress specific classes */
.wp-block-image {
    margin: 2rem 0;
}

.wp-block-image img {
    border-radius: 12px;
}

.wp-block-gallery {
    margin: 2rem 0;
}

.wp-block-gallery .blocks-gallery-item {
    border-radius: 12px;
    overflow: hidden;
}

.wp-block-cover {
    border-radius: 12px;
    margin: 2rem 0;
}

.wp-block-group {
    margin: 2rem 0;
}

.wp-block-group.has-background {
    padding: 2rem;
    border-radius: 12px;
    background: var(--accent);
}

/* Nested Content Styles */
.nested-settings-content {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Toggle Items */
.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    min-height: 56px;
}

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

.toggle-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-icon {
    color: var(--muted-foreground);
    flex-shrink: 0;
}

.toggle-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--card-foreground);
}

/* Theme Options */
.theme-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--muted-foreground);
    position: relative;
    flex-shrink: 0;
}

.theme-radio.checked {
    border-color: var(--primary);
}

.theme-radio.checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

/* Action Items */
.action-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background-color 0.3s;
    min-height: 56px;
}

.action-item:hover {
    background: var(--accent);
}

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

.action-icon {
    color: var(--muted-foreground);
    margin-right: 12px;
    flex-shrink: 0;
}

.action-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--card-foreground);
    flex: 1;
}

/* Theme Options */
.theme-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    min-height: 56px;
}

.theme-option:last-child {
    border-bottom: none;
}

.theme-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--card-foreground);
}

/* Ensure full screen on all devices */
@media (min-width: 769px) {
    .settings-modal-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
        margin: 0;
    }
}

/* Large desktop screens */
@media (min-width: 1200px) {
    .settings-modal-container {
        width: 100%;
        height: 100%;
    }
}

/* Tablet landscape */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .settings-modal-container {
        width: 100%;
        height: 100%;
    }
}

/* Responsive adjustments for display settings */
@media (max-width: 480px) {
    .theme-option {
        padding: 14px 12px;
        min-height: 52px;
    }
    
    .theme-label {
        font-size: 16px;
    }
    
    .theme-toggle-medium {
        width: 44px;
        height: 26px;
    }
    
    .theme-toggle-medium::after {
        width: 18px;
        height: 18px;
    }
    
    .theme-toggle-medium.checked::after {
        transform: translateX(18px);
    }
    
    .switch-toggle {
        width: 44px;
        height: 26px;
    }
    
    .switch-thumb {
        width: 22px;
        height: 22px;
    }
    
    .switch-toggle.checked .switch-thumb {
        transform: translateX(18px);
    }
}

/* Card Round Setup - Consistent Card Styling */
.settings-card {
    background: var(--card);
    border-radius: 16px;
    border: none;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.settings-card:last-child {
    margin-bottom: 0;
}

.card-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.card-content {
    padding: 0;
}

/* User Settings Logout Button Container - Full Width */
.user-settings-logout {
    padding: 32px 16px; /* Increased vertical padding for empty space */
    margin-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.user-settings-logout .cancel-btn {
    background: transparent;
    color: #DC1E25;
    border: 1px solid #DC1E25;
    padding: 0 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    height: 40px; /* Slightly taller */
    line-height: 40px;
    width: 100%;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin: 0;
    box-sizing: border-box;
}

.user-settings-logout .cancel-btn:hover {
    background: rgba(220, 30, 37, 0.1);
    color: #b3191f;
}

/* Display Settings Footer - Hidden */
.settings-modal-container .nested-settings-content ~ .user-settings-logout {
    display: none !important;
}

/* Hide logout button in display settings */
.display-settings-content ~ .user-settings-logout {
    display: none !important;
}

/* Updated User Settings Styles */

/* Updated card styling for user-settings */
.settings-modal-container .settings-card {
    background: var(--card);
    border-radius: 16px;
    border: none;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 0 0 8px 0; /* Reduced bottom margin */
}

/* Remove header from cards in user-settings */
.settings-modal-container .settings-card .card-header {
    display: none;
}

/* Card content spacing */
.settings-modal-container .settings-card .card-content {
    padding: 0;
}

/* Ensure display settings cards keep their headers */
.display-settings-content .settings-card .card-header {
    display: block !important;
}

/* Hide external titles in display-settings */
.display-settings-content .section-main-title {
    display: none;
}

/* Ensure display settings remain unchanged */
.display-settings-content .settings-card {
    margin-bottom: 16px; /* Keep original margin for display settings */
}

/* Make sure cards don't have headers in user settings */
#settings-main-content .settings-card .card-header {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .settings-card {
        border-radius: 12px;
        margin-bottom: 12px;
    }
    
    .user-settings-logout {
        padding: 24px 16px;
    }
    
    .card-header {
        padding: 14px;
    }
    
    .user-settings-logout .cancel-btn {
        padding: 0 20px;
        height: 36px;
        line-height: 36px;
        font-size: 13px;
    }
    
    .section-main-title {
        padding: 0 16px 6px 16px;
        font-size: 12px;
    }
}