/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f0f2f5;
    color: #1c1e21;
    line-height: 1.34;
}

/* Header Styles */
.header {
    background-color: #ffffff;
    padding: 0 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.header-left {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 320px;
}

.logo h1 {
    color: #1877f2;
    font-size: 32px;
    font-weight: bold;
    margin-right: 16px;
    cursor: pointer;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #f0f2f5;
    border-radius: 50px;
    padding: 8px 16px;
    flex: 1;
    max-width: 240px;
}

.search-bar i {
    color: #65676b;
    margin-right: 8px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    color: #1c1e21;
    font-size: 15px;
    flex: 1;
}

.search-bar input::placeholder {
    color: #65676b;
}

.header-center {
    display: flex;
    justify-content: center;
    flex: 1;
    max-width: 590px;
}

.nav-icons {
    display: flex;
    gap: 8px;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 56px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.nav-icon a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.nav-icon:hover {
    background-color: #f0f2f5;
}

.nav-icon.active {
    color: #1877f2;
    border-bottom: 3px solid #1877f2;
}

.nav-icon i {
    font-size: 20px;
    color: #65676b;
}

.nav-icon.active i {
    color: #1877f2;
}

.header-right {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 320px;
    justify-content: flex-end;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icon {
    width: 40px;
    height: 40px;
    background-color: #e4e6ea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.header-icon:hover {
    background-color: #d8dadf;
}

.header-icon i {
    color: #1c1e21;
    font-size: 16px;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #e41e3f;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.profile-dropdown {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px;
    border-radius: 20px;
    transition: background-color 0.2s;
    position: relative;
}

.profile-dropdown:hover {
    background-color: #f0f2f5;
}

.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
}

.profile-dropdown i {
    color: #65676b;
}

/* Profile Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid #dadde1;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e4e6ea;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-header:hover {
    background-color: #f2f3f5;
}

.dropdown-profile-pic {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.dropdown-profile-info h4 {
    font-size: 17px;
    font-weight: 600;
    color: #1c1e21;
    margin: 0 0 2px 0;
}

.dropdown-profile-info p {
    font-size: 13px;
    color: #65676b;
    margin: 0;
}

.dropdown-section {
    padding: 8px 0;
    border-bottom: 1px solid #e4e6ea;
}

.dropdown-section:last-child {
    border-bottom: none;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.dropdown-item:hover {
    background-color: #f2f3f5;
}

.dropdown-icon {
    width: 36px;
    height: 36px;
    background-color: #e4e6ea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.dropdown-icon i {
    color: #1c1e21;
    font-size: 16px;
}

.dropdown-content {
    flex: 1;
}

.dropdown-content span {
    font-size: 15px;
    font-weight: 600;
    color: #1c1e21;
    display: block;
    margin-bottom: 2px;
}

.dropdown-content p {
    font-size: 13px;
    color: #65676b;
    margin: 0;
}

.dropdown-arrow {
    color: #65676b;
    font-size: 12px;
    margin-left: auto;
}

.logout-item .dropdown-icon {
    background-color: #e74c3c;
}

.logout-item .dropdown-icon i {
    color: white;
}

.logout-item:hover {
    background-color: #ffeaea;
}

/* Main Content */
.main-content {
    display: block;
    max-width: 1920px;
    margin: 56px auto 0;
    padding: 20px 0;
    width: 100%;
}

/* Left Sidebar */
.left-sidebar {
    position: fixed;
    top: 76px;
    left: 0;
    width: 360px;
    height: calc(100vh - 76px);
    overflow-y: auto;
    padding: 0 32px 0 16px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 4px;
}

.sidebar-item:hover {
    background-color: #e4e6ea;
}

.sidebar-icon {
    width: 36px;
    height: 36px;
    margin-right: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #1877f2;
}

.sidebar-item img.sidebar-icon {
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-item span {
    font-size: 15px;
    font-weight: 500;
    color: #1c1e21;
}

/* See More Section */
.see-more-section {
    margin-top: 8px;
    border-top: 1px solid #dadde1;
    padding-top: 8px;
}

.see-more-toggle {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.see-more-toggle:hover {
    background-color: #f0f2f5;
}

.see-more-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-left: 12px;
    border-left: 2px solid #e4e6ea;
    margin-left: 18px;
    margin-top: 4px;
}

.see-more-content.expanded {
    max-height: 600px;
    transition: max-height 0.3s ease-in;
}

.see-more-content .sidebar-item {
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 8px;
}

.see-more-content .sidebar-item:hover {
    background-color: #f0f2f5;
}

.see-more-content .sidebar-item .sidebar-icon {
    font-size: 16px;
    width: 20px;
    color: #65676b;
}

.see-more-content .sidebar-item span {
    font-size: 14px;
    font-weight: 400;
    color: #65676b;
}

#see-more-icon {
    transition: transform 0.3s ease;
}

#see-more-icon.rotated {
    transform: rotate(180deg);
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid #e4e6ea;
    font-size: 12px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.footer-links a {
    color: #65676b;
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.footer-links a:hover {
    background-color: #f2f3f5;
    color: #1877f2;
}

.footer-info {
    color: #65676b;
    line-height: 1.4;
    margin-bottom: 15px;
}

.footer-social {
    margin-bottom: 15px;
}

.footer-social h4 {
    color: #1c1e21;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-links a {
    color: #1877f2;
    text-decoration: none;
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.social-links a:hover {
    background-color: #e7f3ff;
    color: #166fe5;
}

.social-links i {
    font-size: 14px;
}

.footer-language {
    margin-bottom: 10px;
}

.footer-language h4 {
    color: #1c1e21;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.language-selector {
    position: relative;
    display: inline-block;
}

.language-selector select {
    background: #f0f2f5;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    padding: 6px 30px 6px 10px;
    font-size: 12px;
    color: #1c1e21;
    cursor: pointer;
    appearance: none;
    min-width: 120px;
}

.language-selector::after {
    content: '▼';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #65676b;
    font-size: 10px;
    pointer-events: none;
}

.language-selector select:hover {
    background: #e4e6ea;
}

.language-selector select:focus {
    outline: 2px solid #1877f2;
    border-color: #1877f2;
}

/* Center Feed */
.center-feed {
    max-width: 680px;
    width: calc(100% - 680px);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Enhanced Stories Container */
.stories-container {
    margin-bottom: 16px;
    position: relative;
}

.stories-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 4px 8px;
    scroll-behavior: smooth;
    position: relative;
}

.stories-carousel::-webkit-scrollbar {
    height: 6px;
}

.stories-carousel::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 3px;
}

.stories-carousel::-webkit-scrollbar-thumb {
    background: #bcc0c4;
    border-radius: 3px;
}

.stories-carousel::-webkit-scrollbar-thumb:hover {
    background: #8a8d91;
}

/* Enhanced Story Cards */
.story {
    min-width: 140px;
    height: 250px;
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.story:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.enhanced-story .story-preview {
    width: 100%;
    height: 100%;
    position: relative;
}

.story-background {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.story:hover .story-background {
    transform: scale(1.05);
}

.story-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.1) 70%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

/* Create Story Special Styling */
.create-story {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.create-story-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.create-story-icon {
    background: #ffffff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.create-story i {
    font-size: 28px;
    color: #667eea;
}

.create-story span {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.create-story-bg {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

/* Story Profile Rings */
.story-profile {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
    z-index: 3;
}

.story-profile.story-ring-new {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24, #feca57, #48ca54, #0abde3, #5f27cd);
    animation: gradientRotate 3s linear infinite;
}

.story-profile.story-ring-viewed {
    background: #bdc3c7;
}

@keyframes gradientRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.story-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

.new-story-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #42b883;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Story Info */
.story-info {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 3;
}

.story-username {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    display: block;
    line-height: 1.2;
}

.story-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    display: block;
    margin-top: 2px;
}

/* Story Count Badge */
.story-count-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    z-index: 3;
}

/* Stories Navigation */
.stories-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    border: 1px solid #dddfe2;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.stories-nav-btn:hover {
    background: #f5f5f5;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stories-nav-prev {
    left: 8px;
}

.stories-nav-next {
    right: 8px;
}

.stories-nav-btn i {
    color: #65676b;
    font-size: 16px;
}

/* Story Viewer Modal */
.story-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.story-viewer-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-viewer-content {
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: #000000;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Story Progress Bar */
.story-progress-container {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10;
}

.story-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.story-progress-fill {
    height: 100%;
    background: #ffffff;
    width: 0%;
    transition: width 0.1s linear;
}

/* Story Viewer Header */
.story-viewer-header {
    position: absolute;
    top: 40px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.story-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.story-viewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.story-user-details h4 {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.story-user-details small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.story-viewer-actions {
    display: flex;
    gap: 8px;
}

.story-action-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: background-color 0.2s ease;
}

.story-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.story-action-btn i {
    color: #ffffff;
    font-size: 16px;
}

/* Story Content Container */
.story-content-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-media {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Story Navigation Areas */
.story-nav-area {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    cursor: pointer;
    z-index: 5;
}

.story-nav-prev {
    left: 0;
}

.story-nav-next {
    right: 0;
}

/* Story Viewer Footer */
.story-viewer-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
}

.story-reactions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.story-reaction-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.story-reaction-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.story-reaction-btn.active {
    background: #ff6b6b;
    transform: scale(1.2);
}

.story-reaction-btn i {
    color: #ffffff;
    font-size: 18px;
}

.story-reply-section {
    display: flex;
    gap: 12px;
    align-items: center;
}

.story-reply-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 14px;
}

.story-reply-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.story-reply-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.story-send-btn {
    background: #1877f2;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.story-send-btn:hover {
    background: #166fe5;
}

.story-send-btn i {
    color: #ffffff;
    font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .story-viewer-content {
        max-width: none;
    }
    
    .stories-nav-btn {
        width: 32px;
        height: 32px;
    }
    
    .stories-nav-btn i {
        font-size: 14px;
    }
    
    .story {
        min-width: 120px;
        height: 200px;
    }
    
    .story-reactions {
        gap: 15px;
    }
    
    .story-reaction-btn {
        width: 40px;
        height: 40px;
    }
    
    .story-reaction-btn i {
        font-size: 16px;
    }
}

/* Enhanced Mobile Story Viewer */
.story-viewer-modal.mobile-view .story-viewer-content {
    border-radius: 0;
    width: 100vw;
    max-width: 100vw;
}

.story-viewer-modal.mobile-view .story-viewer-header {
    top: env(safe-area-inset-top, 20px);
    left: 16px;
    right: 16px;
}

.story-viewer-modal.mobile-view .story-progress-container {
    top: calc(env(safe-area-inset-top, 20px) + 60px);
    left: 16px;
    right: 16px;
}

/* Story Loading Animation */
.story-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Progress Bars for Multiple Stories */
.story-progress-container {
    display: flex;
    gap: 4px;
}

.story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.story-progress-bar.complete .story-progress-fill {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.8);
}

.story-progress-bar.active .story-progress-fill {
    background: #ffffff;
}

.story-progress-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 2px;
}

/* Floating Story Reactions */
.floating-story-reaction {
    position: absolute;
    font-size: 30px;
    z-index: 15;
    pointer-events: none;
    animation: floatReaction 2s ease-out forwards;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes floatReaction {
    0% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-150px) scale(1.5);
    }
}

/* Story Notifications */
.story-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    max-width: 90vw;
    text-align: center;
}

.story-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Enhanced Touch Gestures */
.story-content-container {
    touch-action: pan-x;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
}

.story-nav-area {
    touch-action: manipulation;
}

/* Story Reaction Button Active States */
.story-reaction-btn.active {
    background: rgba(255, 255, 255, 0.4) !important;
    transform: scale(1.2);
    animation: reactionPulse 0.6s ease-out;
}

@keyframes reactionPulse {
    0%, 100% { transform: scale(1.2); }
    50% { transform: scale(1.4); }
}

/* Enhanced Story Info Overlay */
.story-info {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px 12px 12px;
    margin: -20px -12px -12px;
}

/* Smooth Story Transitions */
.story-media {
    transition: opacity 0.3s ease, transform 0.3s ease;
    will-change: transform, opacity;
}

.story-content.loading .story-media {
    opacity: 0;
    transform: scale(0.9);
}

/* Stories Carousel Enhancements */
.stories-carousel {
    scroll-snap-type: x mandatory;
}

.story {
    scroll-snap-align: start;
}

/* Enhanced Create Story Button */
.create-story:hover .create-story-bg {
    animation-duration: 1.5s;
}

.create-story:active {
    transform: scale(0.95);
}

/* Improved Mobile Touch Areas */
@media (max-width: 768px) {
    .story-nav-area {
        width: 45%;
    }
    
    .story-nav-area.story-nav-prev {
        left: 0;
    }
    
    .story-nav-area.story-nav-next {
        right: 0;
    }
    
    .story-viewer-footer {
        padding: 16px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
    
    .story-reply-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 14px 16px;
    }
    
    .story-send-btn {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }
    
    .story-reactions {
        overflow-x: auto;
        padding: 0 16px;
        justify-content: flex-start;
        gap: 12px;
    }
    
    .story-reaction-btn {
        flex-shrink: 0;
        min-width: 44px;
        min-height: 44px;
    }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .story-profile {
        border-width: 2px;
    }
    
    .story-avatar {
        border-width: 1px;
    }
    
    .story-progress-bar {
        height: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .story,
    .story-background,
    .create-story-bg,
    .floating-story-reaction,
    .story-notification {
        animation: none !important;
        transition-duration: 0.1s !important;
    }
    
    .story:hover {
        transform: none;
    }
    
    .story-reaction-btn.active {
        animation: none;
    }
}

/* Dark Theme Story Adjustments */
@media (prefers-color-scheme: dark) {
    .story-notification {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(20px);
    }
    
    .stories-nav-btn {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .stories-nav-btn:hover {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* Accessibility Improvements */
@media (prefers-high-contrast: high) {
    .story-profile.story-ring-new {
        border: 4px solid #ffffff;
        background: #000000;
    }
    
    .story-profile.story-ring-viewed {
        border: 4px solid #666666;
        background: #333333;
    }
    
    .story-progress-fill {
        background: #ffffff !important;
    }
}

/* Focus States for Keyboard Navigation */
.story:focus,
.story-action-btn:focus,
.story-reaction-btn:focus {
    outline: 2px solid #1877f2;
    outline-offset: 2px;
}

.story-reply-input:focus {
    outline: 2px solid #1877f2;
    outline-offset: -2px;
}

.story span {
    position: absolute;
    bottom: 8px;
    left: 8px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Create Post */
.create-post {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    padding: 12px 16px;
}

.create-post-top {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.create-post-top .profile-pic {
    margin-right: 8px;
}

.post-input {
    flex: 1;
    border: none;
    outline: none;
    background-color: #f0f2f5;
    border-radius: 50px;
    padding: 12px 16px;
    font-size: 16px;
    color: #1c1e21;
}

.post-input::placeholder {
    color: #65676b;
}

.create-post-bottom {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #e4e6ea;
    padding-top: 8px;
}

.post-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    flex: 1;
    justify-content: center;
}

.post-option:hover {
    background-color: #f0f2f5;
}

.post-option i {
    margin-right: 8px;
    font-size: 20px;
}

.post-option:nth-child(1) i {
    color: #f3425f;
}

.post-option:nth-child(2) i {
    color: #45bd62;
}

.post-option:nth-child(3) i {
    color: #f7b928;
}

.post-option span {
    font-size: 15px;
    font-weight: 600;
    color: #65676b;
}

/* Posts */
.post {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    padding: 12px 16px;
}

.post-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.post-info {
    flex: 1;
    margin-left: 8px;
}

.post-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1c1e21;
    margin-bottom: 2px;
}

.post-info p {
    font-size: 13px;
    color: #65676b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-options {
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.post-options:hover {
    background-color: #f0f2f5;
}

.post-options i {
    color: #65676b;
}

.post-content p {
    font-size: 15px;
    line-height: 1.33;
    color: #1c1e21;
    margin-bottom: 12px;
}

.post-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 12px;
}

.post-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e4e6ea;
    margin-bottom: 4px;
}

.post-reactions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.reaction-icons {
    display: flex;
    gap: -2px;
}

.reaction-icons i {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    margin-left: -2px;
}

.reaction-icons .fa-thumbs-up {
    background-color: #1877f2;
}

.reaction-icons .fa-heart {
    background-color: #e41e3f;
}

.reaction-icons .fa-laugh {
    background-color: #f7b928;
}

.post-reactions span {
    color: #65676b;
    font-size: 15px;
}

.post-comments-shares {
    display: flex;
    gap: 16px;
}

.post-comments-shares span {
    color: #65676b;
    font-size: 15px;
    cursor: pointer;
}

.post-comments-shares span:hover {
    text-decoration: underline;
}

.post-actions {
    display: flex;
    justify-content: space-around;
    padding: 4px 0;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    flex: 1;
    gap: 8px;
}

.action-btn:hover {
    background-color: #f0f2f5;
}

.action-btn i {
    color: #65676b;
    font-size: 16px;
}

.action-btn span {
    color: #65676b;
    font-size: 15px;
    font-weight: 600;
}

/* Right Sidebar */
.right-sidebar {
    position: fixed;
    top: 76px;
    right: 0;
    width: 320px;
    height: calc(100vh - 76px);
    overflow-y: auto;
    padding: 0 16px 0 32px;
}

.sponsored {
    margin-bottom: 16px;
}

.sponsored h3 {
    color: #65676b;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.sponsored-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 8px;
}

.sponsored-item:hover {
    background-color: #f0f2f5;
}

.sponsored-item img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin-right: 12px;
    object-fit: cover;
}

.sponsored-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1c1e21;
    margin-bottom: 2px;
}

.sponsored-content p {
    font-size: 12px;
    color: #65676b;
}

.contacts {
    border-top: 1px solid #e4e6ea;
    padding-top: 16px;
}

.contacts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.contacts-header h3 {
    color: #65676b;
    font-size: 17px;
    font-weight: 600;
}

.contacts-icons {
    display: flex;
    gap: 8px;
}

.contacts-icons i {
    color: #65676b;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.contacts-icons i:hover {
    background-color: #f0f2f5;
}

.contact {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 4px;
    position: relative;
}

.contact:hover {
    background-color: #f0f2f5;
}

.contact-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.contact span {
    flex: 1;
    font-size: 14px;
    color: #1c1e21;
}

.online-status {
    width: 8px;
    height: 8px;
    background-color: #31a24c;
    border-radius: 50%;
    border: 2px solid #ffffff;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        padding: 20px 16px;
    }
    
    .left-sidebar {
        width: 320px;
    }
    
    .center-feed {
        width: calc(100% - 600px);
        max-width: 680px;
        margin: 0 auto;
        padding: 0 16px;
    }
    
    .right-sidebar {
        width: 280px;
    }
}

@media (max-width: 1024px) {
    .header-center {
        display: none;
    }
    
    .main-content {
        padding: 20px 16px;
    }
    
    .left-sidebar {
        display: none;
    }
    
    .center-feed {
        width: calc(100% - 280px);
        max-width: none;
        padding: 0 10px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 8px;
    }
    
    .search-bar {
        display: none;
    }
    
    .logo h1 {
        font-size: 24px;
        margin-right: 8px;
    }
    
    .main-content {
        padding: 16px 8px;
    }
    
    .center-feed {
        width: 100%;
        max-width: 100%;
        padding: 0 8px;
        margin: 0;
    }
    
    .right-sidebar {
        display: none;
    }
    
    .stories {
        gap: 4px;
    }
    
    .story {
        min-width: 80px;
        height: 140px;
    }
    
    .create-post {
        margin-bottom: 8px;
    }
    
    .post {
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .header-icons .header-icon:not(:last-child) {
        display: none;
    }
    
    .profile-dropdown i {
        display: none;
    }
    
    .post-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .action-btn {
        justify-content: flex-start;
        padding: 12px;
    }
}

/* Scrollbar Styling */
.left-sidebar::-webkit-scrollbar,
.right-sidebar::-webkit-scrollbar {
    width: 8px;
}

.left-sidebar::-webkit-scrollbar-track,
.right-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.left-sidebar::-webkit-scrollbar-thumb,
.right-sidebar::-webkit-scrollbar-thumb {
    background-color: #bcc0c4;
    border-radius: 4px;
}

.left-sidebar::-webkit-scrollbar-thumb:hover,
.right-sidebar::-webkit-scrollbar-thumb:hover {
    background-color: #8a8d91;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post {
    animation: fadeIn 0.3s ease-out;
}

/* Focus States */
.search-bar input:focus {
    outline: 2px solid #1877f2;
    outline-offset: -2px;
}

.post-input:focus {
    outline: 2px solid #1877f2;
    outline-offset: -2px;
}

/* Button Hover Effects */
.action-btn:hover .fa-thumbs-up {
    color: #1877f2;
}

.action-btn:hover .fa-comment {
    color: #65676b;
}

.action-btn:hover .fa-share {
    color: #65676b;
}

.action-btn:hover span {
    color: #1c1e21;
}

/* Chat/Message Box */
.chat-container {
    position: fixed;
    bottom: 0;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-tab-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
}

.chat-tab {
    background: #ffffff;
    border: 1px solid #e4e6ea;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 200px;
    max-width: 250px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.chat-tab:hover {
    background: #f5f6f7;
}

.chat-tab.active {
    background: #ffffff;
    border-color: #1877f2;
}

.chat-tab-pic {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-tab span {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #1c1e21;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.close-chat-tab {
    background: none;
    border: none;
    color: #65676b;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-chat-tab:hover {
    background: #f0f2f5;
    color: #1c1e21;
}

.chat-window {
    width: 328px;
    height: 455px;
    background: #ffffff;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    border: 1px solid #e4e6ea;
    border-bottom: none;
    animation: slideUpChat 0.3s ease-out;
}

.chat-window.minimized {
    height: 56px;
    overflow: hidden;
}

@keyframes slideUpChat {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.chat-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e4e6ea;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border-radius: 8px 8px 0 0;
    min-height: 56px;
}

.chat-header-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-header-info {
    flex: 1;
}

.chat-header-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1c1e21;
    margin-bottom: 2px;
}

.chat-status {
    font-size: 12px;
    color: #65676b;
}

.chat-status.online::before {
    content: '●';
    color: #31a24c;
    margin-right: 4px;
}

.chat-header-actions {
    display: flex;
    gap: 4px;
}

.chat-action-btn,
.minimize-chat {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f0f2f5;
    color: #65676b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-action-btn:hover,
.minimize-chat:hover {
    background: #e4e6ea;
    color: #1c1e21;
}

.chat-messages {
    flex: 1;
    padding: 12px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fa;
}

.message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.message.sent {
    flex-direction: row-reverse;
    margin-left: 40px;
}

.message.received {
    margin-right: 40px;
}

.message-pic {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.message.sent .message-pic {
    display: none;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message.sent .message-content {
    align-items: flex-end;
}

.message-bubble {
    background: #e4e6ea;
    color: #1c1e21;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    max-width: 200px;
    word-wrap: break-word;
}

.message.sent .message-bubble {
    background: #1877f2;
    color: #ffffff;
}

.message-time {
    font-size: 11px;
    color: #65676b;
    padding: 0 8px;
}

.typing-indicator {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-right: 40px;
}

.typing-dots {
    background: #e4e6ea;
    border-radius: 18px;
    padding: 12px 16px;
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #65676b;
    animation: typingDots 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDots {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    30% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Feedback Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.feedback-modal {
    background: white;
    border-radius: 8px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e4e6ea;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1c1e21;
}

.modal-header button {
    background: none;
    border: none;
    font-size: 24px;
    color: #65676b;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.modal-header button:hover {
    background: #f2f3f5;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin: 0 0 16px 0;
    color: #1c1e21;
    font-size: 15px;
}

.modal-body textarea {
    width: 100%;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    padding: 12px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.modal-body textarea:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-secondary,
.btn-primary {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-secondary {
    background: #e4e6ea;
    color: #1c1e21;
}

.btn-secondary:hover {
    background: #d8dadf;
}

.btn-primary {
    background: #1877f2;
    color: white;
}

.btn-primary:hover {
    background: #166fe5;
}

/* Toast Notification */
.toast-notification {
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Dark Mode Support */
body.dark-mode {
    background: #18191a;
    color: #e4e6ea;
}

body.dark-mode .header {
    background: #242526;
    border-bottom-color: #3e4042;
}

body.dark-mode .dropdown-menu {
    background: #3a3b3c;
    border-color: #3e4042;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

body.dark-mode .dropdown-header:hover,
body.dark-mode .dropdown-item:hover {
    background: #4e4f50;
}

body.dark-mode .dropdown-profile-info h4,
body.dark-mode .dropdown-content span {
    color: #e4e6ea;
}

body.dark-mode .dropdown-profile-info p,
body.dark-mode .dropdown-content p,
body.dark-mode .dropdown-arrow {
    color: #b0b3b8;
}

body.dark-mode .dropdown-icon {
    background: #4e4f50;
}

body.dark-mode .dropdown-icon i {
    color: #e4e6ea;
}

body.dark-mode .feedback-modal {
    background: #3a3b3c;
}

body.dark-mode .modal-header {
    border-bottom-color: #3e4042;
}

body.dark-mode .modal-header h3,
body.dark-mode .modal-body p {
    color: #e4e6ea;
}

body.dark-mode .modal-body textarea {
    background: #4e4f50;
    border-color: #3e4042;
    color: #e4e6ea;
}

body.dark-mode .btn-secondary {
    background: #4e4f50;
    color: #e4e6ea;
}

body.dark-mode .btn-secondary:hover {
    background: #5a5b5c;
}

.chat-input-container {
    padding: 12px 16px;
    border-top: 1px solid #e4e6ea;
    background: #ffffff;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    background: #f0f2f5;
    border-radius: 20px;
    padding: 8px 12px;
    gap: 8px;
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #1c1e21;
}

.chat-input::placeholder {
    color: #65676b;
}

.chat-emoji-btn,
.chat-attach-btn,
.chat-photo-btn,
.chat-send-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: #1877f2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.chat-emoji-btn:hover,
.chat-attach-btn:hover,
.chat-photo-btn:hover,
.chat-send-btn:hover {
    background: rgba(24, 119, 242, 0.1);
}

.chat-send-btn {
    background: #1877f2;
    color: #ffffff;
}

.chat-send-btn:hover {
    background: #166fe5;
}

.chat-send-btn:disabled {
    background: #e4e6ea;
    color: #bcc0c4;
    cursor: not-allowed;
}

/* Chat Messages Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: #bcc0c4;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background-color: #8a8d91;
}

/* Responsive Chat */
@media (max-width: 768px) {
    .chat-container {
        right: 10px;
    }
    
    .chat-window {
        width: 280px;
        height: 400px;
    }
    
    .chat-tab {
        min-width: 150px;
        max-width: 180px;
    }
    
    .message.sent {
        margin-left: 20px;
    }
    
    .message.received {
        margin-right: 20px;
    }
}

@media (max-width: 480px) {
    .chat-container {
        right: 5px;
    }
    
    .chat-window {
        width: 260px;
        height: 350px;
    }
    
    .chat-tab {
        min-width: 120px;
        max-width: 150px;
        padding: 6px 8px;
    }
    
    .chat-tab span {
        font-size: 12px;
    }
}