/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

:root {
    --primary-color: #181818;
    --secondary-color: #1a1a1a;
    --accent-color: #e6b800;
    --text-color: #ffffff;
    --light-text: #ffffff;
    --dark-bg: #000000;
    --border-color: #333333;
    --transition-speed: 0.3s;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(26, 26, 26, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-bg: #222222;
}

body {
    background: var(--primary-color);
    color: var(--light-text) !important;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
    line-height: 1.6;
}

/* Remove background image for better performance */
body::before {
    display: none;
}

/* Particles Background - Optimized */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.7;
}

/* Glassmorphism Effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--box-shadow);
}

/* Navbar Styles */
nav {
    position: sticky;
    top: 0;
    background: rgba(26, 26, 26, 0.95);
    z-index: 100;
    padding: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--light-text);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--light-text);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.logo:hover {
    color: var(--accent-color);
    text-shadow: 0 2px 6px rgba(230, 184, 0, 0.5);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links li a {
    color: var(--light-text) !important;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    padding: 8px 15px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-links li a .icon {
    margin-right: 8px;
}

.nav-links li a:hover {
    color: var(--accent-color);
    text-shadow: 0 2px 4px rgba(230, 184, 0, 0.4);
}

.nav-links li a:hover::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), #ffd700);
    bottom: -5px;
    left: 0;
    animation: underline 0.3s forwards;
}

@keyframes underline {
    from { width: 0; }
    to { width: 100%; }
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(26, 26, 26, 0.98);
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    z-index: 10;
    transition: opacity 0.2s ease;
    opacity: 0;
}

.dropdown-menu a {
    display: block;
    color: var(--light-text) !important;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    text-decoration: none;
    padding: 8px 15px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.dropdown-menu a:hover {
    color: var(--accent-color);
    text-shadow: 0 2px 4px rgba(230, 184, 0, 0.4);
    background: rgba(255, 255, 255, 0.1);
}

.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
}

.search-bar input {
    padding: 10px 15px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light-text);
    outline: none;
    font-size: 0.9rem;
    width: 200px;
    transition: width 0.3s ease, background 0.3s ease;
}

.search-bar input:focus {
    width: 250px;
    background: rgba(255, 255, 255, 0.15);
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.login-btn {
    padding: 10px 20px;
    background: var(--accent-color);
    border: none;
    border-radius: 25px;
    color: var(--dark-bg);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.3s ease;
}

.login-btn:hover {
    background: #ffd700;
    transform: translateY(-2px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 250px;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 200;
    padding: 20px;
    transition: left 0.5s ease;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu ul {
    list-style: none;
    margin-top: 50px;
}

.mobile-menu ul li {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-menu ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
}

/* Hamburger */
.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #fff;
    margin-right: 15px;
    z-index: 201;
    /* Đảm bảo hamburger ở trên cùng */
}

/* Main Content */
.main-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 30px 20px;
    position: relative;
    z-index: 1;
}

/* Stories Section - Improved Layout */
/* Stories Section - Improved Layout - Căn chỉnh cân đối */
.stories {
    padding: 30px 0;
    margin-bottom: 30px;
}

.stories h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--light-text) !important;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stories-swiper {
    padding: 15px 0;
    overflow: hidden;
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.stories-swiper .swiper-wrapper {
    align-items: center;
    display: flex;
    justify-content: flex-start;
    padding: 0 20px;
}

.stories-swiper .swiper-slide {
    width: auto !important;
    margin-right: 15px;
    flex-shrink: 0;
}

.story {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 80px;
    max-width: 80px;
    width: 80px;
    height: auto;
}

.story:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.story img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    object-fit: cover;
    transition: border-color 0.3s ease;
    display: block;
    margin: 0 auto;
}

.story:hover img {
    border-color: #ffd700;
}

.story span {
    font-size: 0.8rem;
    color: var(--light-text) !important;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Navigation buttons for stories - Căn chỉnh lại */
.stories-swiper .swiper-button-next,
.stories-swiper .swiper-button-prev {
    color: var(--accent-color);
    width: 32px;
    height: 32px;
    margin-top: -16px;
    background: var(--card-bg);
    border-radius: 50%;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.stories-swiper .swiper-button-next:hover,
.stories-swiper .swiper-button-prev:hover {
    background: var(--accent-color);
    color: var(--dark-bg);
    transform: scale(1.1);
}

.stories-swiper .swiper-button-next::after,
.stories-swiper .swiper-button-prev::after {
    font-size: 12px;
    font-weight: 600;
}

.stories-swiper .swiper-button-prev {
    left: 5px;
}

.stories-swiper .swiper-button-next {
    right: 5px;
}

/* Timeline Section */
.timeline {
    padding: 0;
    margin-bottom: 40px;
}

.timeline h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--light-text) !important;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.timeline > p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.6;
}

.post-composer {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

.post-composer:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.composer-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0; /* Ngăn avatar bị co lại */
}

.composer-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.post-composer textarea {
    width: 100%;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    resize: none;
    font-size: 1rem;
    color: var(--light-text) !important;
    font-weight: 400;
    outline: none;
    height: 80px;
    line-height: 1.5;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: background 0.3s ease;
    font-family: inherit;
}

.post-composer textarea:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
}

.post-composer textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.composer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.composer-tools {
    display: flex;
    gap: 15px;
    align-items: center;
}

.tool-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: color 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.tool-btn:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

.image-upload {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: color 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.image-upload:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

.image-upload input[type="file"] {
    display: none;
}

.post-composer .post-btn {
    padding: 10px 25px;
    background: var(--accent-color);
    border: none;
    border-radius: 25px;
    color: var(--dark-bg);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.3s ease, background 0.3s ease;
    white-space: nowrap;
    min-height: 40px;
}

.post-composer .post-btn:hover {
    transform: translateY(-2px);
    background: #ffd700;
}

.post-composer .post-btn:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 480px) {
    .post-composer {
        padding: 15px;
        gap: 12px;
    }
    
    .composer-avatar {
        width: 40px;
        height: 40px;
    }
    
    .composer-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .composer-tools {
        justify-content: center;
    }
    
    .post-composer .post-btn {
        width: 100%;
        justify-self: stretch;
    }
}
.thread-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.thread {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.thread:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.thread-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.thread-header img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.thread-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--light-text) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.thread-info span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.thread-content p {
    color: var(--light-text) !important;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.thread-content img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
    margin-top: 10px;
}

.thread-content img:hover {
    transform: scale(1.02);
}

.thread-actions {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.reactions {
    display: flex;
    gap: 15px;
}

.reaction-btn, .comment-btn, .share-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.reaction-btn:hover, .comment-btn:hover, .share-btn:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

.thread-comments {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.comment {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.comment img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.comment-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--light-text) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
}

.comment-content p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8) !important;
    line-height: 1.5;
}

.comment-input {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 15px;
}

.comment-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    outline: none;
    font-size: 0.9rem;
    color: var(--light-text) !important;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

.comment-input input:focus {
    background: rgba(255, 255, 255, 0.08);
}

.comment-input input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.comment-input button {
    background: var(--accent-color);
    border: none;
    color: var(--dark-bg);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-input button:hover {
    transform: scale(1.1);
    background: #ffd700;
}

.load-more {
    display: block;
    margin: 30px auto;
    padding: 12px 30px;
    background: transparent;
    border: 2px solid var(--accent-color);
    border-radius: 25px;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.load-more:hover {
    background: var(--accent-color);
    color: var(--dark-bg);
    transform: translateY(-2px);
}

/* Trending Section - Fixed Overflow */
.trending {
    padding: 40px 0;
    margin-bottom: 40px;
    overflow: hidden;
}

.trending h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--light-text) !important;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.trending-swiper {
    padding: 15px 0;
    overflow: hidden;
    text-align: center;
    width: 100%; 
}

.trending-swiper .swiper-wrapper {
    align-items: center;
}

.trending-swiper .swiper-slide {
    width: auto !important;
    margin-right: 12px;
}

.trending-item {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    min-width: 160px;
    max-width: 160px;
    width: 160px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trending-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.trending-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--accent-color);
}

.trending-item p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Navigation buttons for trending */
.trending-swiper .swiper-button-next,
.trending-swiper .swiper-button-prev {
    color: var(--accent-color);
    width: 35px;
    height: 35px;
    margin-top: -17px;
    background: var(--card-bg);
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.trending-swiper .swiper-button-next::after,
.trending-swiper .swiper-button-prev::after {
    font-size: 14px;
}

/* Notifications Section */
.notifications {
    padding: 40px 0;
    margin-bottom: 40px;
}

.notifications h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--light-text) !important;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 100%;
}

.notification {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

.notification:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.notification img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.notification-content {
    flex: 1;
}

.notification-content p {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--light-text) !important;
    margin-bottom: 5px;
}

.notification-content span {
    font-size: 0.8rem;
    color: var(--accent-color);
    display: block;
}

/* Share Modal */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.share-modal.active {
    display: flex;
}

.share-modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    border: 1px solid var(--border-color);
}

.share-modal-content h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--light-text);
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.share-option {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 10px;
    color: var(--light-text);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-option:hover {
    background: var(--accent-color);
    color: var(--dark-bg);
    transform: translateY(-2px);
}

.close-modal {
    padding: 10px 25px;
    background: var(--border-color);
    border: none;
    border-radius: 25px;
    color: var(--light-text);
    cursor: pointer;
    transition: background 0.3s ease;
}

.close-modal:hover {
    background: var(--accent-color);
    color: var(--dark-bg);
}

/* Footer Styles */
footer {
    background: var(--secondary-color);
    padding: 40px 20px;
    color: var(--light-text);
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--light-text);
    opacity: 0.8;
    font-size: 1rem;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent-color);
    transform: translateY(-2px);
}

.footer-social {
    margin: 25px 0;
}

.footer-social a {
    margin: 0 15px;
    color: var(--light-text);
    font-size: 1.5rem;
    transition: all var(--transition-speed) ease;
}

.footer-social a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
    text-shadow: 0 0 10px rgba(230, 184, 0, 0.5);
}

footer p {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 20px;
}

/* Mode Toggle */
.mode-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: var(--accent-color);
    color: var(--dark-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 100;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Responsive Design */
/* Responsive Design */

/* Large tablets and small desktops */
@media (max-width: 1200px) {
    .nav-container {
        max-width: 95%;
        padding: 0 20px;
    }
    
    .main-content {
        max-width: 90%;
    }
    
    .trending-item {
        min-width: 170px;
        max-width: 170px;
        width: 170px;
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .nav-links, 
    .nav-right {
        display: none;
    }

    .hamburger {
        display: block;
        margin-right: 0;
    }

    .main-content {
        max-width: 90%;
        padding: 20px 15px;
    }
    
    .nav-container {
        padding: 0 20px;
    }
    
    .logo {
        font-size: 1.6rem;
    }
    
    .timeline h2, 
    .trending h2, 
    .notifications h2 {
        font-size: 1.8rem;
    }
    
    .stories h2 {
        font-size: 1.6rem;
    }
    
    .story {
        min-width: 75px;
        max-width: 75px;
    }
    
    .story img {
        width: 55px;
        height: 55px;
    }
    
    .trending-item {
        min-width: 160px;
        max-width: 160px;
        width: 160px;
        padding: 18px;
    }
    
    .post-composer {
        padding: 18px;
    }
    
    .thread {
        padding: 20px;
    }
    
    .mode-toggle {
        bottom: 25px;
        right: 25px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Mobile landscape and small tablets */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 15px 10px;
        max-width: 95%;
    }

    .timeline h2, 
    .trending h2, 
    .notifications h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    .stories h2 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .timeline > p {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    /* Post composer mobile optimization */
    .post-composer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }

    .composer-avatar {
        align-self: flex-start;
        width: 40px;
        height: 40px;
    }
    
    .post-composer textarea {
        height: 70px;
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .composer-actions {
        width: 100%;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .composer-tools {
        justify-content: center;
        gap: 20px;
    }
    
    .post-composer .post-btn {
        align-self: center;
        padding: 12px 30px;
    }

    /* Stories mobile optimization */
    .stories-swiper .swiper-wrapper {
        padding: 0 15px;
    }
    .story {
        min-width: 70px;
        max-width: 70px;
        padding: 12px;
    }
    
    .story img {
        width: 50px;
        height: 50px;
        border-width: 2px;
    }
    
    .story span {
        font-size: 0.8rem;
    }
    
    .stories-swiper .swiper-slide,
    .trending-swiper .swiper-slide {
        margin-right: 8px;
    }

    /* Trending mobile optimization */
    .trending-item {
        min-width: 140px;
        max-width: 140px;
        width: 140px;
        padding: 15px;
    }
    
    .trending-item h3 {
        font-size: 1.1rem;
    }
    
    .trending-item p {
        font-size: 0.85rem;
    }

    /* Thread mobile optimization */
    .thread {
        padding: 18px;
        margin-bottom: 20px;
    }
    
    .thread-header {
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .thread-header img {
        width: 40px;
        height: 40px;
    }
    
    .thread-info h3 {
        font-size: 1rem;
    }
    
    .thread-info span {
        font-size: 0.8rem;
    }
    
    .thread-content p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .thread-actions {
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .reactions {
        gap: 12px;
    }
    
    .reaction-btn, 
    .comment-btn, 
    .share-btn {
        font-size: 0.85rem;
        padding: 6px 10px;
    }

    /* Comments mobile optimization */
    .comment {
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .comment img {
        width: 32px;
        height: 32px;
    }
    
    .comment-content h4 {
        font-size: 0.9rem;
    }
    
    .comment-content p {
        font-size: 0.85rem;
    }
    
    .comment-input {
        gap: 10px;
    }
    
    .comment-input input {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .comment-input button {
        width: 35px;
        height: 35px;
    }

    /* Navigation buttons mobile */
    .stories-swiper .swiper-button-next,
    .stories-swiper .swiper-button-prev,
    .trending-swiper .swiper-button-next,
    .trending-swiper .swiper-button-prev {
        width: 30px;
        height: 30px;
        margin-top: -15px;
    }
    
    .stories-swiper .swiper-button-next::after,
    .stories-swiper .swiper-button-prev::after,
    .trending-swiper .swiper-button-next::after,
    .trending-swiper .swiper-button-prev::after {
        font-size: 12px;
    }

    /* Notifications mobile */
    .notification {
        padding: 15px;
        gap: 12px;
    }
    
    .notification img {
        width: 35px;
        height: 35px;
    }
    
    .notification-content p {
        font-size: 0.9rem;
    }
    
    .notification-content span {
        font-size: 0.75rem;
    }

    /* Modal mobile optimization */
    .share-modal-content {
        padding: 25px;
        width: 95%;
        max-width: 400px;
    }
    
    .share-modal-content h3 {
        font-size: 1.2rem;
        margin-bottom: 18px;
    }
    
    .share-options {
        gap: 12px;
    }
    
    .share-option {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    /* Footer mobile */
    .footer-links {
        gap: 20px;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-links a {
        font-size: 0.95rem;
    }
    
    .footer-social a {
        margin: 0 10px;
        font-size: 1.3rem;
    }

    /* Mode toggle mobile */
    .mode-toggle {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .main-content {
        padding: 10px 8px;
    }
    
    .nav-container {
        padding: 0 12px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .timeline h2, 
    .trending h2, 
    .notifications h2 {
        font-size: 1.4rem;
    }
    
    .stories h2 {
        font-size: 1.2rem;
    }
    
    .story {
        min-width: 65px;
        max-width: 65px;
        width: 65px;
        padding: 8px;
    }
    
    .story img {
        width: 45px;
        height: 45px;
    }
    
    .story span {
        font-size: 0.75rem;
    }

    .stories-swiper .swiper-slide {
        margin-right: 10px;
    }
    
    .stories-swiper .swiper-button-next,
    .stories-swiper .swiper-button-prev {
        width: 28px;
        height: 28px;
        margin-top: -14px;
    }
    
    .stories-swiper .swiper-button-next::after,
    .stories-swiper .swiper-button-prev::after {
        font-size: 10px;
    }
    
    .trending-item {
        min-width: 140px;
        max-width: 140px;
        width: 140px;
        padding: 12px;
    }
    
    .trending-item h3 {
        font-size: 1rem;
    }
    
    .trending-item p {
        font-size: 0.8rem;
    }
    
    .post-composer {
        padding: 12px;
    }
    
    .post-composer textarea {
        height: 60px;
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .thread {
        padding: 15px;
    }
    
    .thread-header img {
        width: 35px;
        height: 35px;
    }
    
    .thread-info h3 {
        font-size: 0.95rem;
    }
    
    .thread-content p {
        font-size: 0.9rem;
    }
    
    
    .mobile-menu {
        width: 100%;
        left: -100%;
    }
    
    .mobile-menu.active {
        left: 0;
    }
}

/* Very small devices */
@media (max-width: 360px) {
    .main-content {
        padding: 8px 5px;
    }
    
    .story {
        min-width: 60px;
        max-width: 60px;
    }
    
    .story img {
        width: 40px;
        height: 40px;
    }
    
    .trending-item {
        min-width: 130px;
        max-width: 130px;
        width: 130px;
    }
    
    .share-modal-content {
        padding: 20px;
        width: 98%;
    }
    
    .share-options {
        grid-template-columns: 1fr;
    }
}