/**
 * ESafe Solutions - Community Hub Premium CSS Styling
 * Designed with a sleek, premium, glassmorphic dark interface to wow users.
 */

:root {
    --gold: #F59E0B;
    --gold-glow: rgba(245, 158, 11, 0.15);
    --silver: #9CA3AF;
    --silver-glow: rgba(156, 163, 175, 0.15);
    --bronze: #D97706;
    --bronze-glow: rgba(217, 119, 6, 0.15);
    --glass-bg: #FFFFFF;
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --glass-hover-border: rgba(37, 99, 235, 0.3);
}

/* ==========================================================================
   COMMUNITY HERO & BACKGROUND LAYERS
   ========================================================================== */
.community-main {
    margin-top: 80px; /* Offset for fixed header */
    background-color: var(--bg-light); /* Light background */
    color: var(--navy);
    min-height: 100vh;
}

.community-hero {
    position: relative;
    padding: 80px 0 60px;
    text-align: center;
    background-color: #0A1128; /* Keep header dark for contrast */
    color: var(--navy);
    overflow: hidden;
    border-bottom: 1px solid rgba(37, 99, 235, 0.15);
}

.community-glow {
    position: absolute;
    width: 600px;
    height: 350px;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-container-small {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.hero-container-small .hero-headline {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 16px;
}

/* ==========================================================================
   DATABASE STATE STATUS BADGE
   ========================================================================== */
.db-status-container {
    position: absolute;
    bottom: 20px;
    right: 24px;
    z-index: 10;
}

.db-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

.db-status-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.db-status-badge.sandbox {
    background-color: rgba(205, 127, 50, 0.15);
    color: #FFA726;
    border-color: rgba(255, 167, 38, 0.3);
}

.db-status-badge.sandbox .status-dot {
    background-color: #FFA726;
    box-shadow: 0 0 10px #FFA726;
}

.db-status-badge.live {
    background-color: rgba(37, 99, 235, 0.15);
    color: var(--blue);
    border-color: rgba(37, 99, 235, 0.3);
}

.db-status-badge.live .status-dot {
    background-color: var(--blue);
    box-shadow: 0 0 10px var(--blue);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: pulseDot 2s infinite;
}

/* Status Tooltip */
.db-status-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    width: 280px;
    background-color: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: var(--radius-md);
    padding: 14px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    pointer-events: none;
    text-align: left;
}

.db-status-container:hover .db-status-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.db-status-tooltip code {
    background-color: #94a3b8;
    color: var(--blue);
    padding: 2px 4px;
    border-radius: 4px;
}

/* ==========================================================================
   GOOGLE AUTH NAV COMPONENT & PROFILE LAYOUT
   ========================================================================== */
.auth-profile-box {
    display: flex;
    align-items: center;
}

.btn-google-signin {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #ffffff;
    color: #444444;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

.btn-google-signin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

.google-icon {
    width: 18px;
    height: 18px;
}

.user-dropdown {
    position: relative;
}

.user-avatar-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--blue);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.15);
    transition: transform 0.3s var(--ease-spring), border-color 0.3s;
}

.user-avatar-btn:hover {
    transform: scale(1.08);
    border-color: var(--blue);
}

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

.user-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 240px;
    background-color: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    z-index: 100;
}

.user-dropdown.active .user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-header {
    margin-bottom: 12px;
}

.menu-name {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--navy);
}

.menu-email {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.menu-divider {
    height: 1px;
    background-color: #94a3b8;
    margin: 12px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s;
    text-align: left;
}

.menu-item:hover {
    background-color: #f1f5f9;
    color: var(--navy);
}

.menu-item.text-danger {
    color: #ff6b6b;
}

.menu-item.text-danger:hover {
    background-color: rgba(255, 107, 107, 0.1);
    color: #ff8e8e;
}

/* ==========================================================================
   DASHBOARD GRID LAYOUT & GLASS CARDS
   ========================================================================== */
.dashboard-section {
    padding: 80px 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 40px;
    align-items: start;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--glass-shadow);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.5s var(--ease-smooth), box-shadow 0.5s var(--ease-smooth), transform 0.3s;
}

.glass-card:hover {
    border-color: var(--glass-hover-border);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.08);
    transform: translateY(-4px);
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    position: relative;
}

.card-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

.title-glow {
    position: absolute;
    left: -36px;
    width: 6px;
    height: 24px;
    background-color: var(--blue);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ==========================================================================
   SERVICE LEADERBOARD STATS & THE DYNAMIC PODIUM
   ========================================================================== */
.overall-rating-bar {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 36px;
}

.overall-stat {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-big {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
}

.stat-right {
    display: flex;
    flex-direction: column;
}

.star-rating-read {
    display: flex;
    gap: 4px;
    color: var(--gold);
    font-size: 1.1rem;
}

.stat-lbl {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Physical Podium Structure */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 200px;
    margin-bottom: 40px;
    padding: 0 10px;
}

.podium-spot {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.4s var(--ease-spring);
    position: relative;
}

.podium-spot:hover {
    transform: translateY(-8px);
}

.podium-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    margin-bottom: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
}

.podium-name {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--navy);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    margin-bottom: 2px;
}

.podium-score {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 8px;
}

.podium-pedestal {
    width: 100%;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.8rem;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Spot heights */
.spot-1 {
    order: 2;
    z-index: 3;
}
.spot-1 .podium-pedestal {
    height: 100px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.25) 0%, rgba(255, 193, 7, 0.05) 100%);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: var(--gold);
    box-shadow: 0 10px 30px var(--gold-glow);
}
.spot-1 .podium-avatar {
    background-color: #ffffff;
    border-color: var(--gold);
}

.spot-2 {
    order: 1;
    z-index: 2;
}
.spot-2 .podium-pedestal {
    height: 70px;
    background: linear-gradient(135deg, rgba(224, 224, 224, 0.2) 0%, rgba(224, 224, 224, 0.03) 100%);
    border: 1px solid rgba(224, 224, 224, 0.3);
    color: var(--silver);
    box-shadow: 0 10px 25px var(--silver-glow);
}
.spot-2 .podium-avatar {
    background-color: #ffffff;
    border-color: var(--silver);
}

.spot-3 {
    order: 3;
    z-index: 1;
}
.spot-3 .podium-pedestal {
    height: 50px;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2) 0%, rgba(205, 127, 50, 0.03) 100%);
    border: 1px solid rgba(205, 127, 50, 0.3);
    color: var(--bronze);
    box-shadow: 0 10px 20px var(--bronze-glow);
}
.spot-3 .podium-avatar {
    background-color: #ffffff;
    border-color: var(--bronze);
}

/* Detailed List Chart Items */
.ranking-chart-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chart-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chart-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
}

.chart-title-lbl {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-icon {
    width: 16px;
    height: 16px;
    color: var(--blue);
}

.chart-score-lbl {
    font-weight: 600;
    color: var(--blue);
}

.chart-bar-bg {
    height: 8px;
    background-color: #f1f5f9;
    border-radius: var(--radius-pill);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue) 0%, var(--blue) 100%);
    border-radius: var(--radius-pill);
    width: 0%; /* Dynamic loading */
    transition: width 1.2s cubic-bezier(0.1, 0.8, 0.1, 1);
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}

/* ==========================================================================
   REVIEW & RATING INTERACTIVE FORMS
   ========================================================================== */
.rating-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.interactive-star-selector {
    display: flex;
    gap: 8px;
    font-size: 2.2rem;
    color: #94a3b8;
    margin-top: 6px;
}

.star-btn {
    transition: transform 0.25s var(--ease-spring), color 0.25s;
    user-select: none;
}

.star-btn:hover {
    transform: scale(1.22);
}

.star-btn.active, 
.star-btn.hover {
    color: var(--gold);
    text-shadow: 0 0 15px var(--gold-glow);
}

.star-feedback-text {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--blue);
    margin-top: 6px;
}

.rating-submit-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.login-warning {
    font-size: 0.78rem;
    color: #ff6b6b;
    font-weight: 500;
}

/* Form inputs matching ESafe branding template */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.select-wrapper select,
.chat-form textarea,
.sim-auth-form input {
    width: 100%;
    background-color: #f8fafc !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: var(--radius-md) !important;
    color: var(--white) !important;
    padding: 14px 20px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none !important;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.select-wrapper select option {
    background-color: #ffffff;
    color: var(--navy);
}

.select-wrapper select:focus,
.chat-form textarea:focus,
.sim-auth-form input:focus {
    border-color: var(--blue) !important;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.25) !important;
}

/* ==========================================================================
   COMMUNITY FEED DISCUSSION & COMMENTS
   ========================================================================== */
.chat-filters-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 20px;
}

.filter-lbl {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.chat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
    transition: background-color 0.3s, border-color 0.3s, color 0.3s, transform 0.2s;
    background: transparent;
}

.filter-btn:hover {
    color: var(--navy);
    border-color: rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
}

.filter-btn.active {
    background-color: var(--blue);
    border-color: var(--blue);
    color: var(--navy);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
}

/* Chat Input Styling */
.post-chat-container {
    margin-bottom: 36px;
}

.signed-out-post-panel {
    background: rgba(37, 99, 235, 0.03);
    border: 1px dashed rgba(37, 99, 235, 0.25);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
}

.signed-out-post-panel p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.btn-inline {
    display: inline-flex;
    padding: 10px 22px;
}

.chat-form {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.form-row-chat {
    margin-bottom: 12px;
}

.chat-category-select select {
    padding: 8px 16px;
    font-size: 0.8rem;
    max-width: 220px;
}

.chat-input-wrapper {
    position: relative;
    display: flex;
    align-items: flex-end;
}

.chat-input-wrapper textarea {
    padding-right: 60px !important;
    resize: none;
    line-height: 1.5;
}

.btn-teal-circle {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--blue);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: transform 0.3s var(--ease-spring), background-color 0.3s;
    border: none;
}

.btn-teal-circle:hover {
    background-color: var(--blue);
    transform: scale(1.08) translateY(-2px);
}

.btn-teal-circle svg {
    margin-left: 2px;
}

/* Chat Threads / Feed list */
.chat-threads-feed {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feed-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid var(--blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.thread-card {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 24px;
    animation: fadeInUp 0.4s var(--ease-smooth) both;
}

.thread-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.thread-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
}

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

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--navy);
}

.post-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.category-tag {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-general { background-color: #94a3b8; color: #FFF; }
.tag-strategy { background-color: rgba(255, 193, 7, 0.15); color: var(--gold); }
.tag-technology { background-color: rgba(37, 99, 235, 0.15); color: var(--blue); }
.tag-envision { background-color: rgba(234, 67, 53, 0.15); color: #FFA726; }
.tag-hr { background-color: rgba(156, 39, 176, 0.15); color: #CE93D8; }
.tag-finance { background-color: rgba(33, 150, 243, 0.15); color: #90CAF9; }
.tag-engage { background-color: rgba(76, 175, 80, 0.15); color: #A5D6A7; }

.thread-body {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-left: 52px;
    margin-bottom: 14px;
    word-break: break-word;
}

.thread-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 52px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: color 0.3s, transform 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
}

.btn-action:hover {
    color: var(--navy);
}

.btn-action.active-upvote {
    color: #ff6b6b;
}

.btn-action.active-upvote svg {
    fill: #ff6b6b;
}

.btn-action svg {
    transition: transform 0.2s var(--ease-spring);
}

.btn-action:hover svg {
    transform: scale(1.15);
}

/* Sub-Replies Lists Layout */
.replies-section {
    margin-left: 52px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
}

/* Vertical line connector for sub threads */
.replies-section::before {
    content: '';
    position: absolute;
    top: 4px;
    left: -24px;
    bottom: 24px;
    width: 2px;
    background-color: rgba(37, 99, 235, 0.12);
}

.reply-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: fadeInUp 0.3s var(--ease-smooth) both;
}

.reply-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

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

.reply-content {
    background-color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    flex: 1;
}

.reply-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.reply-author-name {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--navy);
}

.reply-time {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.reply-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    word-break: break-word;
}

/* Reply Input Block */
.reply-input-box {
    margin-left: 52px;
    margin-top: 12px;
    animation: fadeIn 0.3s var(--ease-smooth);
}

.reply-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.reply-input-wrapper input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: var(--radius-pill) !important;
    padding: 10px 48px 10px 18px !important;
    color: var(--white) !important;
    font-family: var(--font-body);
    font-size: 0.82rem;
    outline: none;
}

.reply-input-wrapper input:focus {
    border-color: var(--blue) !important;
}

.btn-reply-send {
    position: absolute;
    right: 6px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--blue);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-reply-send:hover {
    background-color: var(--blue);
    transform: scale(1.05);
}

/* ==========================================================================
   SIMULATED AUTH MODAL DIALOG POPUP
   ========================================================================== */
.sim-auth-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(5, 10, 30, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
}

.sim-auth-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sim-auth-modal {
    background-color: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    padding: 36px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sim-auth-overlay.active .sim-auth-modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    position: relative;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--navy);
}

.modal-close {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.8rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--navy);
}

.modal-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.demo-account-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.demo-acc-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    width: 100%;
    text-align: left;
    transition: border-color 0.3s, background-color 0.3s, transform 0.2s;
}

.demo-acc-btn:hover {
    border-color: var(--blue);
    background-color: rgba(37, 99, 235, 0.05);
    transform: translateX(4px);
}

.demo-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--navy);
}

.bg-navy { background-color: #ffffff; }
.bg-teal { background-color: var(--blue); }
.bg-purple { background-color: #9c27b0; }

.demo-details {
    display: flex;
    flex-direction: column;
}

.demo-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--navy);
}

.demo-email {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.modal-divider {
    text-align: center;
    position: relative;
    margin: 24px 0;
}

.modal-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #94a3b8;
}

.modal-divider span {
    position: relative;
    background-color: #ffffff;
    padding: 0 14px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
}

.sim-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sim-auth-form input {
    padding: 10px 16px !important;
}

.btn-full {
    width: 100%;
    padding: 12px 0;
}

/* Animation utilities matching script.js */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ==========================================================================
   RESPONSIVE DESIGN SYSTEM MEDIA QUERY FOR TABLET AND MOBILE CODES
   ========================================================================== */
@media (max-width: 991px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .ranking-card {
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .community-hero {
        padding: 60px 0 40px;
    }
    .glass-card {
        padding: 24px;
    }
    .overall-stat {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .podium-container {
        height: 170px;
    }
    .podium-spot {
        max-width: 80px;
    }
    .podium-avatar {
        width: 38px;
        height: 38px;
    }
    .podium-name {
        font-size: 0.72rem;
        max-width: 70px;
    }
    .spot-1 .podium-pedestal { height: 80px; }
    .spot-2 .podium-pedestal { height: 55px; }
    .spot-3 .podium-pedestal { height: 40px; }
    
    .replies-section {
        margin-left: 20px;
    }
    .replies-section::before {
        left: -12px;
    }
    .reply-input-box {
        margin-left: 20px;
    }
    .thread-body {
        margin-left: 0;
        font-size: 0.88rem;
    }
    .thread-footer {
        margin-left: 0;
    }
    .db-status-container {
        position: static;
        margin-top: 16px;
        text-align: center;
        display: flex;
        justify-content: center;
    }
    .db-status-tooltip {
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        right: auto;
    }
    .db-status-container:hover .db-status-tooltip {
        transform: translateX(-50%) translateY(0);
    }
}
