/* ============================================= */
/* HIDDENINK - Main Stylesheet */
/* ============================================= */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #000000;
    color: #ffffff;
    line-height: 1.5;
}

/* ============================================= */
/* AUTH PAGES STYLES */
/* ============================================= */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Background Effects */
.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.08) 0%, transparent 50%);
    z-index: -1;
    animation: glowMove 20s ease-in-out infinite;
}

@keyframes glowMove {
    0%, 100% { 
        opacity: 0.5;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 440px;
    position: relative;
}

.auth-card {
    background: rgba(16, 16, 16, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-glow {
    display: inline-block;
    position: relative;
}

.logo-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    filter: blur(20px);
    z-index: -1;
}

.brand-name {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.welcome-text {
    color: #888888;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.4;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #cccccc);
    border-radius: 2px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 32px;
}

.name-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ============================================= */
/* WAVE GROUP INPUTS - From Uiverse.io */
/* ============================================= */

.wave-group {
    position: relative;
    width: 100%;
}

.wave-group .input {
    font-size: 16px;
    padding: 20px 10px 10px 5px;
    display: block;
    width: 100%;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: #ffffff;
    transition: all 0.3s ease;
}

.wave-group .input:focus {
    outline: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.wave-group .label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    font-weight: normal;
    position: absolute;
    pointer-events: none;
    left: 5px;
    top: 20px;
    display: flex;
    transition: 0.2s ease all;
}

.wave-group .label-char {
    transition: 0.2s ease all;
    transition-delay: calc(var(--index) * .05s);
}

.wave-group .input:focus ~ .label .label-char,
.wave-group .input:valid ~ .label .label-char {
    transform: translateY(-25px);
    font-size: 14px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.wave-group .bar {
    position: relative;
    display: block;
    width: 100%;
}

.wave-group .bar:before,
.wave-group .bar:after {
    content: '';
    height: 2px;
    width: 0;
    bottom: 1px;
    position: absolute;
    background: linear-gradient(90deg, #ffffff, #cccccc);
    transition: 0.3s ease all;
}

.wave-group .bar:before {
    left: 50%;
}

.wave-group .bar:after {
    right: 50%;
}

.wave-group .input:focus ~ .bar:before,
.wave-group .input:focus ~ .bar:after {
    width: 50%;
}

/* Error States */
.wave-group.error .input {
    border-bottom: 1px solid #ff4444;
}

.wave-group.error .bar:before,
.wave-group.error .bar:after {
    background: #ff4444;
}

.error-message {
    color: #ff4444;
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #888888;
    transition: color 0.3s ease;
}

.checkbox:hover {
    color: #ffffff;
}

.checkbox input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.checkmark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ffffff, #cccccc);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkbox input:checked + .checkmark {
    border-color: transparent;
}

.checkbox input:checked + .checkmark::before {
    opacity: 1;
}

.checkbox input:checked + .checkmark::after {
    content: '✓';
    color: #000000;
    font-size: 12px;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

.forgot-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Buttons */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn.primary {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    color: #000000;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.auth-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.3);
}

.auth-btn.secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-btn.secondary:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* Button Loader */
.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading .btn-text {
    opacity: 0;
}

.loading .btn-loader {
    display: block;
}

/* Divider */
.divider {
    text-align: center;
    position: relative;
    margin: 32px 0;
    color: #666666;
    font-size: 14px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.divider span {
    background: rgba(16, 16, 16, 0.9);
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer p {
    color: #666666;
    font-size: 14px;
    line-height: 1.5;
}

.auth-footer a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* ============================================= */
/* FEED PAGE STYLES - Updated with Sidebar */
/* ============================================= */

.app-layout {
    display: flex;
    min-height: 100vh;
    background: #000000;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(16, 16, 16, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px 20px;
}

.sidebar-header {
    margin-bottom: 40px;
}

.sidebar-header .logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

/* Sidebar Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    color: #888888;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-item svg {
    flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #333333, #555555);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-info .username {
    font-weight: 600;
    color: #ffffff;
    font-size: 14px;
}

.user-points {
    font-size: 12px;
    color: #10b981;
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999;
    padding: 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Search Bar */
.search-container {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    transition: all 0.3s ease;
    width: 100%;
}

.search-input {
    width: 100%;
    border: none;
    background: none;
    color: #ffffff;
    font-size: 16px;
    outline: none;
    padding: 0;
}

.search-input::placeholder {
    color: #888888;
}

.search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888888;
    transition: color 0.3s ease;
    margin-left: 12px;
}

.search-bar:focus-within {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(26, 26, 26, 0.9);
}

.search-bar:focus-within .search-icon {
    color: #ffffff;
}

.search-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 200%;
    border-radius: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
    transition: all 0.5s ease;
    transform: translate(-50%, -50%) scale(0);
    z-index: -1;
}

.search-bar:focus-within + .search-glow {
    transform: translate(-50%, -50%) scale(1);
}

/* Feed Container */
.feed-container {
    padding: 0 0 80px 0;
    max-width: 800px;
    margin: 0 auto;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 16px;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #000000;
}

.quick-actions .action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.quick-actions .action-btn.primary {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    color: #000000;
}

.quick-actions .action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.quick-actions .action-btn.secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.quick-actions .action-btn.secondary:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

/* Feed Posts */
.feed-posts {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 0;
}

/* Post Card */
.post-card {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin: 0 24px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.3s ease;
}

.post-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Post Header */
.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
}

.post-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #333333, #555555);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.username {
    font-weight: 600;
    color: #ffffff;
    font-size: 16px;
}

.post-time {
    font-size: 14px;
    color: #888888;
}

.post-menu {
    background: none;
    border: none;
    color: #888888;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.post-menu:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

/* Post Content */
.post-content {
    padding: 0 24px 24px;
}

.question-text {
    margin-bottom: 20px;
}

.question-text h3 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.4;
}

.question-text p {
    font-size: 16px;
    color: #cccccc;
    line-height: 1.6;
    margin: 0;
}

.question-image {
    margin: 20px 0;
}

.image-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888888;
    font-size: 16px;
}

/* Answer Section */
.answer-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.correct-answer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.correct-answer strong {
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
}

.answer-value {
    color: #10b981;
    font-weight: 600;
    font-size: 18px;
}

.points-info {
    font-size: 15px;
    color: #888888;
}

.points-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #000000;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

/* Post Actions */
.post-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #888888;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.action-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.like-btn.liked {
    color: #ef4444;
}

.like-btn.liked svg {
    fill: #ef4444;
    stroke: #ef4444;
}

.like-count {
    min-width: 24px;
    text-align: center;
}

.post-stats-mini {
    margin-left: auto;
    font-size: 15px;
    color: #888888;
}

/* Answer Input Section */
.answer-input-section {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.answer-input-container {
    display: flex;
    gap: 16px;
    align-items: center;
}

.answer-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 16px 20px;
    color: #ffffff;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.answer-input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.answer-input::placeholder {
    color: #888888;
}

.submit-answer-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #000000;
    border: none;
    border-radius: 10px;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.submit-answer-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.submit-answer-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #000000;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    transform: translateX(400px);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10000;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    width: 24px;
    height: 24px;
    background: #000000;
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.notification-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-text strong {
    font-weight: 700;
}

/* Like Animation */
@keyframes likePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.like-pop {
    animation: likePop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================= */
/* AUTH PAGES FIX - Ensure Centered Layout */
/* ============================================= */

/* Reset layout for auth pages */
body:has(.auth-container) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

body:has(.auth-container) .app-layout {
    display: block;
    width: 100%;
    max-width: 440px;
}

body:has(.auth-container) .sidebar {
    display: none;
}

body:has(.auth-container) .main-content {
    margin-left: 0;
    width: 100%;
}

/* Alternative method for browsers that don't support :has() */
.auth-page .app-layout {
    display: block;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.auth-page .sidebar {
    display: none;
}

.auth-page .main-content {
    margin-left: 0;
    width: 100%;
}

/* Ensure auth container works properly */
.auth-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

/* Fix any potential conflicts */
.auth-card {
    position: relative;
    z-index: 1;
}

/* ============================================= */
/* RESPONSIVE STYLES */
/* ============================================= */

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    
    .sidebar-content {
        padding: 20px 12px;
    }
    
    .sidebar-header .logo h1 {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .nav-item span {
        display: none;
    }
    
    .nav-item {
        justify-content: center;
        padding: 16px;
    }
    
    .user-profile .user-info {
        display: none;
    }
    
    .main-content {
        margin-left: 80px;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .answer-input-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .submit-answer-btn {
        width: 100%;
    }
    
    .notification {
        left: 20px;
        right: 20px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 70px;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .header-content {
        padding: 16px;
    }
    
    .search-bar {
        padding: 14px 16px;
    }
    
    .post-card {
        margin: 0 16px;
    }
    
    .post-header,
    .post-content,
    .post-actions,
    .answer-input-section {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .post-actions {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .post-stats-mini {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
    
    .correct-answer {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .question-text h3 {
        font-size: 18px;
    }
    
    .question-text p {
        font-size: 14px;
    }
    
    /* Auth Pages Mobile */
    .auth-card {
        padding: 32px 24px;
    }
    
    .brand-name {
        font-size: 2.5rem;
    }
    
    .welcome-text {
        font-size: 1.1rem;
    }
    
    .name-group {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .wave-group .input {
        font-size: 16px;
        padding: 18px 10px 8px 5px;
    }
    
    .wave-group .label {
        font-size: 16px;
        top: 18px;
    }
    
    .wave-group .input:focus ~ .label .label-char,
    .wave-group .input:valid ~ .label .label-char {
        transform: translateY(-22px);
        font-size: 13px;
    }
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }


}
/* ============================================= */
/* PROFILE PAGE STYLES */
/* ============================================= */

.profile-container {
    max-width: 935px;
    margin: 0 auto;
    padding: 30px 20px;
}

.profile-header {
    display: flex;
    gap: 60px;
    margin-bottom: 44px;
    padding: 0 20px;
}

.profile-avatar-section {
    flex-shrink: 0;
}

.profile-avatar {
    position: relative;
    width: 150px;
    height: 150px;
}

.avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #333333, #555555);
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.edit-avatar-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: #000000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.edit-avatar-btn:hover {
    background: #ffffff;
    transform: scale(1.1);
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-header-top {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.profile-username {
    font-size: 28px;
    font-weight: 300;
    color: #ffffff;
    margin: 0;
}

.profile-actions {
    display: flex;
    gap: 8px;
}

.edit-profile-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-profile-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

.settings-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

.profile-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-number {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.stat-label {
    font-size: 14px;
    color: #888888;
}

.profile-bio {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bio-text {
    font-size: 16px;
    color: #ffffff;
    margin: 0;
    line-height: 1.5;
}

.join-date {
    font-size: 14px;
    color: #888888;
    margin: 0;
}

.profile-tabs {
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #888888;
    padding: 16px 32px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-top: 1px solid transparent;
    margin-top: -1px;
}

.tab-btn:hover {
    color: #ffffff;
}

.tab-btn.active {
    color: #ffffff;
    border-top-color: #ffffff;
}

.tab-content {
    min-height: 400px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 0 20px;
}

.profile-post-card {
    background: rgba(16, 16, 16, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-post-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.post-preview h3 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.post-preview p {
    font-size: 14px;
    color: #cccccc;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.post-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #888888;
}

.post-actions {
    display: flex;
    justify-content: flex-end;
}

.post-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #888888;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.post-action-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.answers-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 20px;
}

.answer-item {
    background: rgba(16, 16, 16, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.answer-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.answer-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.answer-text {
    font-size: 14px;
    color: #cccccc;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.answer-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
}

.answer-points {
    color: #10b981;
    font-weight: 600;
}

.answer-date {
    color: #888888;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0 20px;
}

.achievement-card {
    background: rgba(16, 16, 16, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.achievement-card.unlocked {
    border-color: rgba(16, 185, 129, 0.3);
}

.achievement-card.locked {
    opacity: 0.5;
}

.achievement-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.achievement-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.achievement-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.achievement-info p {
    font-size: 14px;
    color: #888888;
    margin: 0;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: rgba(16, 16, 16, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #888888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.modal-body {
    padding: 24px;
}

.edit-profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.form-input,
.form-textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    color: #000000;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        gap: 30px;
        text-align: center;
        padding: 0;
    }

    .profile-avatar {
        margin: 0 auto;
    }

    .profile-header-top {
        flex-direction: column;
        gap: 16px;
    }

    .profile-stats {
        justify-content: center;
    }

    .profile-tabs {
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 20px;
    }

    .tab-btn {
        white-space: nowrap;
        padding: 16px 20px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .answers-list,
    .achievements-grid {
        padding: 0;
    }

    .modal-content {
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .profile-container {
        padding: 20px 16px;
    }

    .profile-avatar {
        width: 120px;
        height: 120px;
    }

    .profile-username {
        font-size: 24px;
    }

    .profile-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 18px;
    }

    .tab-btn {
        padding: 14px 16px;
        font-size: 13px;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }
}
/* ============================================= */
/* SEARCH PAGE STYLES */
/* ============================================= */

.search-container-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Search Filters */
.search-filters {
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-tabs {
    display: flex;
    gap: 0;
}

.filter-tab {
    background: none;
    border: none;
    color: #888888;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.filter-tab:hover {
    color: #ffffff;
}

.filter-tab.active {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

/* Search Results */
.search-results {
    margin-bottom: 40px;
}

.results-section {
    display: none;
}

.results-section.active {
    display: block;
}

.results-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
}

/* Users Grid */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.user-card {
    background: rgba(16, 16, 16, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-card .user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-card .username {
    font-weight: 600;
    color: #ffffff;
    font-size: 16px;
}

.user-bio {
    font-size: 14px;
    color: #888888;
}

.user-stats {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #cccccc;
}

.follow-btn {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    color: #000000;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.follow-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.follow-btn.following {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.follow-btn.following:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Questions List */
.questions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-question-card {
    background: rgba(16, 16, 16, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.search-question-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.question-content {
    flex: 1;
}

.question-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.question-preview {
    font-size: 14px;
    color: #cccccc;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.question-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #888888;
}

.subject-tag {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.answer-btn-small {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.answer-btn-small:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

/* Subjects Grid */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.subject-card {
    background: rgba(16, 16, 16, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.subject-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.subject-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.subject-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.subject-card p {
    font-size: 14px;
    color: #888888;
    margin: 0;
}

.explore-btn {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.explore-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

/* Recent Searches */
.recent-searches {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.recent-searches h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
}

.recent-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.search-tag {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-tag:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design for Search Page */
@media (max-width: 768px) {
    .search-container-page {
        padding: 20px 16px;
    }

    .filter-tabs {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .filter-tab {
        white-space: nowrap;
        padding: 14px 20px;
    }

    .users-grid {
        grid-template-columns: 1fr;
    }

    .search-question-card {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .question-actions {
        align-self: flex-end;
    }

    .subjects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .recent-search-tags {
        gap: 8px;
    }

    .search-tag {
        font-size: 13px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .subjects-grid {
        grid-template-columns: 1fr;
    }

    .filter-tab {
        padding: 12px 16px;
        font-size: 14px;
    }

    .user-card {
        padding: 16px;
    }

    .search-question-card {
        padding: 16px;
    }
}
/* ============================================= */
/* CHAT PAGE STYLES */
/* ============================================= */

.chat-layout {
    display: flex;
    height: 100vh;
    background: #000000;
}

/* Conversations Sidebar */
.conversations-sidebar {
    width: 400px;
    background: rgba(16, 16, 16, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.conversations-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.conversations-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.new-chat-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    padding: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-chat-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.conversation-search {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.conversation-search .search-bar {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.conversation-search .search-bar:focus-within {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.conversation-search .search-input {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 14px;
    width: 100%;
    outline: none;
}

.conversation-search .search-input::placeholder {
    color: #888888;
}

/* Conversations List */
.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.conversation-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.conversation-item.active {
    background: rgba(255, 255, 255, 0.1);
    border-right: 3px solid #ffffff;
}

.conversation-avatar {
    position: relative;
    flex-shrink: 0;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid rgba(16, 16, 16, 0.95);
}

.offline-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #888888;
    border-radius: 50%;
    border: 2px solid rgba(16, 16, 16, 0.95);
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.conversation-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 14px;
}

.conversation-time {
    font-size: 12px;
    color: #888888;
}

.conversation-preview p {
    font-size: 13px;
    color: #888888;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.unread-count {
    background: #10b981;
    color: #000000;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000000;
}

/* No Chat Selected */
.no-chat-selected {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
}

.empty-state {
    text-align: center;
    max-width: 400px;
    padding: 40px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
}

.empty-state p {
    font-size: 16px;
    color: #888888;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.start-chat-btn {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    color: #000000;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* Active Chat */
.active-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000000;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.95);
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-details .username {
    font-weight: 600;
    color: #ffffff;
    font-size: 16px;
}

.user-status {
    font-size: 12px;
    color: #10b981;
}

.chat-actions {
    display: flex;
    gap: 8px;
}

.chat-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    padding: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Messages Container */
.messages-container {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-bottom-left-radius: 4px;
}

.message.sent {
    align-self: flex-end;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #000000;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

/* Message Input */
.message-input-container {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.95);
}

.message-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.message-input-wrapper:focus-within {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.attachment-btn,
.send-btn {
    background: none;
    border: none;
    color: #888888;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attachment-btn:hover,
.send-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-btn:disabled:hover {
    color: #888888;
    background: none;
}

.message-input {
    flex: 1;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 15px;
    outline: none;
    resize: none;
    max-height: 120px;
}

.message-input::placeholder {
    color: #888888;
}

/* New Chat Modal Styles */
.users-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 16px;
}

.user-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.user-list-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-list-info {
    flex: 1;
}

.user-list-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 14px;
}

.user-list-bio {
    font-size: 12px;
    color: #888888;
}

/* Responsive Design for Chat */
@media (max-width: 768px) {
    .conversations-sidebar {
        width: 100%;
        position: absolute;
        z-index: 100;
        height: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .conversations-sidebar.mobile-open {
        transform: translateX(0);
    }

    .chat-area {
        width: 100%;
    }

    .message {
        max-width: 85%;
    }

    .conversations-header,
    .conversation-search,
    .conversation-item {
        padding-left: 16px;
        padding-right: 16px;
    }

    .chat-header,
    .message-input-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .messages-container {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .empty-state {
        padding: 20px;
    }

    .empty-icon {
        font-size: 48px;
    }

    .empty-state h3 {
        font-size: 20px;
    }

    .empty-state p {
        font-size: 14px;
    }

    .start-chat-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .message-input-wrapper {
        padding: 10px 16px;
    }

    .message-input {
        font-size: 14px;
    }
}
/* ============================================= */
/* CHAT PAGE ENHANCEMENTS */
/* ============================================= */

/* Fix chat layout height */
.chat-layout {
    display: flex;
    height: calc(100vh - 60px); /* Subtract header height */
    background: #000000;
}

.conversations-sidebar {
    height: 100%;
    overflow: hidden;
}

.conversations-list {
    height: calc(100% - 160px); /* Fixed height for chat list */
    overflow-y: auto;
}

/* Chat Dropdown Menu */
.chat-dropdown {
    position: relative;
}

.chat-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(32, 32, 32, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.chat-dropdown-menu.show {
    display: block;
    animation: dropdownSlide 0.2s ease-out;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.dropdown-item svg {
    flex-shrink: 0;
}

/* Voice Message Styles */
.voice-message-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    max-width: 70%;
    animation: messageSlide 0.3s ease-out;
}

.voice-message.received {
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.voice-message.sent {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    background: linear-gradient(135deg, #10b981, #059669);
}

.voice-play-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.voice-play-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.voice-play-btn.playing {
    background: rgba(16, 185, 129, 0.3);
}

.voice-waveform {
    flex: 1;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.voice-waveform::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.1s linear;
}

.voice-waveform.playing::before {
    animation: voicePlay 3s linear forwards;
}

@keyframes voicePlay {
    from { width: 0%; }
    to { width: 100%; }
}

.voice-duration {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.voice-message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

/* Voice Record Button */
.voice-record-btn {
    background: none;
    border: none;
    color: #888888;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-record-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.voice-record-btn.recording {
    color: #ef4444;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.voice-record-timer {
    font-size: 12px;
    color: #ef4444;
    margin: 0 8px;
    min-width: 40px;
    text-align: center;
}

/* Message Input Enhancements */
.message-input-wrapper {
    position: relative;
}

.voice-record-container {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 24px;
    margin-bottom: 8px;
}

.voice-record-container.show {
    display: flex;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.record-stop-btn {
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.record-stop-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.record-cancel-btn {
    background: none;
    border: none;
    color: #888888;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.record-cancel-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .chat-layout {
        height: calc(100vh - 60px);
    }
    
    .voice-message-container {
        max-width: 85%;
    }
    
    .chat-dropdown-menu {
        right: -10px;
        min-width: 160px;
    }
}
/* ============================================= */
/* FINAL POLISH & ENHANCEMENTS */
/* ============================================= */

/* Enhanced Scrollbars */
.conversations-list::-webkit-scrollbar,
.messages-container::-webkit-scrollbar,
.users-list::-webkit-scrollbar {
    width: 6px;
}

.conversations-list::-webkit-scrollbar-track,
.messages-container::-webkit-scrollbar-track,
.users-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.conversations-list::-webkit-scrollbar-thumb,
.messages-container::-webkit-scrollbar-thumb,
.users-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.conversations-list::-webkit-scrollbar-thumb:hover,
.messages-container::-webkit-scrollbar-thumb:hover,
.users-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Firefox Scrollbar */
.conversations-list,
.messages-container,
.users-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

/* Smooth Transitions Enhancement */
.conversation-item,
.message,
.voice-message-container,
.user-card,
.search-question-card,
.subject-card,
.profile-post-card,
.achievement-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Hover Effects Polish */
.conversation-item:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.08);
}

.message.sent:hover,
.voice-message.sent:hover {
    transform: translateX(-2px) scale(1.02);
}

.message.received:hover,
.voice-message.received:hover {
    transform: translateX(2px) scale(1.02);
}

/* Button Polish */
.chat-action-btn,
.voice-record-btn,
.attachment-btn,
.send-btn,
.dropdown-item,
.follow-btn,
.answer-btn-small,
.explore-btn,
.post-action-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.chat-action-btn::before,
.voice-record-btn::before,
.attachment-btn::before,
.send-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.chat-action-btn:hover::before,
.voice-record-btn:hover::before,
.attachment-btn:hover::before,
.send-btn:hover::before {
    width: 40px;
    height: 40px;
}

/* Input Field Polish */
.search-input,
.message-input,
.form-input,
.form-textarea,
.answer-input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus,
.message-input:focus,
.form-input:focus,
.form-textarea:focus,
.answer-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

/* Card Polish */
.user-card:hover,
.search-question-card:hover,
.subject-card:hover,
.profile-post-card:hover,
.achievement-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Notification Polish */
.notification {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                opacity 0.3s ease;
}

.notification.show {
    transform: translateX(0) scale(1);
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Voice Message Polish */
.voice-play-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.voice-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.voice-play-btn.playing {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Message Animation Enhancement */
@keyframes messageSlideEnhanced {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message,
.voice-message-container {
    animation: messageSlideEnhanced 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Online Indicator Polish */
.online-indicator {
    box-shadow: 0 0 0 2px rgba(16, 16, 16, 0.95),
                0 0 10px rgba(16, 185, 129, 0.5);
    animation: onlinePulse 2s infinite;
}

@keyframes onlinePulse {
    0%, 100% { 
        box-shadow: 0 0 0 2px rgba(16, 16, 16, 0.95),
                    0 0 10px rgba(16, 185, 129, 0.5);
    }
    50% { 
        box-shadow: 0 0 0 2px rgba(16, 16, 16, 0.95),
                    0 0 15px rgba(16, 185, 129, 0.8);
    }
}

/* Gradient Borders */
.conversation-item.active {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    border-right: 3px solid;
    border-image: linear-gradient(135deg, #10b981, #3b82f6) 1;
}

/* Focus States for Accessibility */
.chat-action-btn:focus,
.voice-record-btn:focus,
.attachment-btn:focus,
.send-btn:focus,
.dropdown-item:focus,
.message-input:focus,
.search-input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Micro-interactions */
.like-btn:active,
.post-action-btn:active,
.chat-action-btn:active {
    transform: scale(0.95);
}

/* Text Selection Polish */
::selection {
    background: rgba(16, 185, 129, 0.3);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(16, 185, 129, 0.3);
    color: #ffffff;
}

/* Backdrop Filter Support */
.conversations-sidebar,
.modal-content,
.chat-dropdown-menu,
.auth-card {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .conversation-item.active {
        border-right: 3px solid #ffffff;
    }
    
    .online-indicator {
        background: #00ff00;
    }
    
    .unread-count {
        background: #ffff00;
        color: #000000;
    }
}

/* Dark Mode Enhancement (already dark, but for consistency) */
@media (prefers-color-scheme: dark) {
    .search-bar,
    .message-input-wrapper {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .search-bar:focus-within,
    .message-input-wrapper:focus-within {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .app-header,
    .message-input-container,
    .chat-actions,
    .new-chat-btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .chat-layout {
        height: auto !important;
    }
}

/* Final Responsive Polish */
@media (max-width: 768px) {
    .conversation-item:hover {
        transform: translateX(2px);
    }
    
    .message.sent:hover,
    .voice-message.sent:hover,
    .message.received:hover,
    .voice-message.received:hover {
        transform: none;
    }
    
    .chat-action-btn:hover::before,
    .voice-record-btn:hover::before,
    .attachment-btn:hover::before,
    .send-btn:hover::before {
        width: 30px;
        height: 30px;
    }
}

/* Performance Optimizations */
.will-change {
    will-change: transform, opacity;
}

/* Custom Cursor for Interactive Elements */
.conversation-item,
.chat-action-btn,
.voice-record-btn,
.send-btn,
.follow-btn,
.post-action-btn {
    cursor: pointer;
}

/* Disabled State Polish */
button:disabled,
input:disabled,
textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Focus Visible for Keyboard Navigation */
.chat-action-btn:focus-visible,
.voice-record-btn:focus-visible,
.send-btn:focus-visible,
.dropdown-item:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    background: rgba(59, 130, 246, 0.1);
}
/* ============================================= */
/* CHAT LAYOUT FIXES */
/* ============================================= */

.chat-layout {
    display: flex;
    height: calc(100vh - 60px);
    background: #000000;
}

.conversations-sidebar {
    width: 400px;
    background: rgba(16, 16, 16, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    max-height: calc(100vh - 200px); /* Fixed height for chat list */
}

/* Chat Area - FIXED SCROLLABLE LAYOUT */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000000;
    height: 100%;
}

.active-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000000;
    height: 100%;
    min-height: 0; /* Important for flexbox scrolling */
}

/* Messages Container - SCROLLABLE AREA */
.messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0; /* Crucial for scrolling */
    max-height: calc(100vh - 200px); /* Fixed maximum height */
}

/* Ensure messages don't overflow */
.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    animation: messageSlide 0.3s ease-out;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.voice-message-container {
    max-width: 70%;
    animation: messageSlide 0.3s ease-out;
}

/* Message Input Area - FIXED AT BOTTOM */
.message-input-container {
    flex-shrink: 0; /* Prevents this from shrinking */
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.95);
}

/* Chat Header - FIXED AT TOP */
.chat-header {
    flex-shrink: 0; /* Prevents this from shrinking */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.95);
}

/* Enhanced Scrollbar for Messages */
.messages-container::-webkit-scrollbar {
    width: 8px;
}

.messages-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin: 10px 0;
}

.messages-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Firefox */
.messages-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

/* Auto-scroll to bottom behavior */
.messages-container {
    scroll-behavior: smooth;
}

/* No Chat Selected State */
.no-chat-selected {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    height: 100%;
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .chat-layout {
        height: calc(100vh - 60px);
    }
    
    .conversations-sidebar {
        width: 100%;
        position: absolute;
        z-index: 100;
        height: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .conversations-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .messages-container {
        padding: 16px;
        max-height: calc(100vh - 180px);
    }
    
    .chat-header,
    .message-input-container {
        padding: 16px;
    }
    
    .message {
        max-width: 85%;
    }
    
    .voice-message-container {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .messages-container {
        padding: 12px;
        max-height: calc(100vh - 160px);
    }
    
    .chat-header,
    .message-input-container {
        padding: 12px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .voice-message-container {
        max-width: 90%;
    }
}

/* Ensure proper scrolling on mobile */
@media (max-width: 768px) {
    .messages-container {
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
}

/* Prevent message input from being too tall */
.message-input-wrapper {
    max-height: 120px;
    overflow-y: auto;
}

.message-input {
    max-height: 80px;
    resize: none;
}
/* ============================================= */
/* ASK PAGE STYLES */
/* ============================================= */

.ask-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px 20px;
}

.ask-card {
    background: rgba(16, 16, 16, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(20px);
}

.ask-header {
    text-align: center;
    margin-bottom: 40px;
}

.ask-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
}

.ask-header p {
    font-size: 16px;
    color: #888888;
    margin: 0;
    line-height: 1.5;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #888888;
    transition: all 0.3s ease;
}

.step span {
    font-size: 14px;
    font-weight: 500;
    color: #888888;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    color: #000000;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.step.active span {
    color: #ffffff;
    font-weight: 600;
}

/* Step Content */
.step-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Upload Area */
.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.upload-area.dragover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.upload-icon {
    margin-bottom: 20px;
    color: #888888;
}

.upload-area h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.upload-area p {
    font-size: 14px;
    color: #888888;
    margin: 0 0 24px 0;
}

.upload-btn {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    color: #000000;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* Image Preview */
.image-preview {
    text-align: center;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.preview-container {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.preview-container img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-image:hover {
    background: #ef4444;
    transform: scale(1.1);
}

.preview-note {
    font-size: 14px;
    color: #10b981;
    font-weight: 500;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    color: #ffffff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23888888' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: #888888;
    margin-top: 4px;
}

.input-hint {
    font-size: 12px;
    color: #888888;
    margin-top: 4px;
    font-style: italic;
}

/* Answer Section */
.answer-section {
    text-align: center;
}

.answer-header {
    margin-bottom: 32px;
}

.answer-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.answer-header p {
    font-size: 16px;
    color: #888888;
    margin: 0;
    line-height: 1.5;
}

.points-info {
    margin-top: 32px;
}

.points-card {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-align: left;
}

.points-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.points-details h4 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 12px 0;
}

.points-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.points-details li {
    font-size: 14px;
    color: #cccccc;
    margin-bottom: 6px;
    line-height: 1.4;
}

.points-details strong {
    color: #10b981;
    font-weight: 600;
}

/* Step Navigation */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary,
.btn-secondary {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    color: #000000;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

/* Success Modal */
.success-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    min-width: 140px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ask-container {
        padding: 20px 16px;
    }
    
    .ask-card {
        padding: 24px;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .progress-steps::before {
        display: none;
    }
    
    .step {
        flex-direction: row;
        gap: 16px;
    }
    
    .upload-area {
        padding: 40px 24px;
    }
    
    .preview-container img {
        max-width: 100%;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .points-card {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ask-header h2 {
        font-size: 24px;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .upload-area h3 {
        font-size: 18px;
    }
    
    .answer-header h3 {
        font-size: 20px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 24px;
        font-size: 14px;
    }
}
/* ============================================= */
/* DROPDOWN STYLING FIXES */
/* ============================================= */

.form-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    color: #ffffff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    cursor: pointer;
    position: relative;
}

.form-select:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.form-select:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.07);
}

/* Custom dropdown options styling */
.form-select option {
    background: #1a1a1a;
    color: #ffffff;
    padding: 12px 16px;
    border: none;
    font-size: 14px;
}

.form-select option:checked {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #000000;
    font-weight: 600;
}

.form-select option:hover {
    background: rgba(16, 185, 129, 0.3);
}

/* For Webkit browsers (Chrome, Safari) */
.form-select::-webkit-scrollbar {
    width: 8px;
}

.form-select::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.form-select::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.form-select::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Custom select wrapper for better styling */
.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    transition: all 0.3s ease;
}

.select-wrapper:focus-within::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    transform: translateY(-50%) rotate(180deg);
}

/* Enhanced dropdown states */
.form-select:invalid {
    color: #888888;
}

.form-select:valid {
    color: #ffffff;
}

.form-select option[value=""] {
    color: #888888;
    font-style: italic;
}

/* Focus state improvements */
.form-select:focus {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* Responsive dropdown improvements */
@media (max-width: 768px) {
    .form-select {
        padding: 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .select-wrapper::after {
        right: 14px;
    }
}

/* Dark theme compatibility */
@media (prefers-color-scheme: dark) {
    .form-select {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .form-select:focus {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-select {
        border: 2px solid #ffffff;
        background: #000000;
    }
    
    .form-select:focus {
        border-color: #10b981;
        outline: 2px solid #10b981;
    }
}
/* ============================================= */
/* NOTIFICATIONS PAGE STYLES */
/* ============================================= */

.notifications-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Notifications Header */
.notifications-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
}

.notifications-actions {
    display: flex;
    gap: 12px;
}

.notifications-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notifications-action-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

/* Notifications Sections */
.notifications-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Notification Items */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: rgba(16, 16, 16, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.notification-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.notification-item.unread {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

/* Notification Avatar */
.notification-avatar {
    position: relative;
    flex-shrink: 0;
}

.notification-avatar .user-avatar-small {
    width: 44px;
    height: 44px;
}

.notification-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.notification-avatar.points .notification-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.notification-avatar.achievement .notification-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.notification-avatar.welcome .notification-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

/* Notification Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-text {
    font-size: 14px;
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 4px;
}

.notification-text strong {
    font-weight: 600;
    color: #ffffff;
}

.notification-time {
    font-size: 12px;
    color: #888888;
}

/* Notification Actions */
.notification-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.notification-action-btn {
    background: transparent;
    border: none;
    color: #888888;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-action-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.follow-back-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.follow-back-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

.follow-back-btn.following {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
    color: #10b981;
}

/* Empty State */
.empty-notifications {
    text-align: center;
    padding: 60px 20px;
}

.empty-notifications .empty-state {
    max-width: 400px;
    margin: 0 auto;
}

.empty-notifications .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-notifications h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.empty-notifications p {
    font-size: 14px;
    color: #888888;
    margin: 0;
    line-height: 1.5;
}

/* Animation for new notifications */
@keyframes notificationSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-item {
    animation: notificationSlide 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .notifications-container {
        padding: 16px;
    }
    
    .header-content {
        padding: 16px;
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .notifications-actions {
        justify-content: flex-end;
    }
    
    .notification-item {
        padding: 12px;
        gap: 12px;
    }
    
    .notification-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .follow-back-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .notification-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .notification-content {
        width: 100%;
    }
    
    .notification-actions {
        align-self: flex-end;
        flex-direction: row;
    }
    
    .notification-item.unread::before {
        top: 12px;
        left: 12px;
        transform: none;
    }
}
