:root {
    --color-primary: #f472b6;
    --color-secondary: #60a5fa;
    --color-bg: #0a0a0a;
    --color-card: rgba(23, 23, 23, 0.85);
    --color-border: rgba(255, 255, 255, 0.08);
    --mobile-nav-height: 70px;
    --header-height-desktop: 70px;
    --header-height-mobile: 56px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --container-padding-sm: 1rem;
    --container-padding-md: 1.5rem;
    --container-padding-lg: 2rem;
    --transition-default: 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--color-bg);
    color: #f5f5f5;
    min-height: 100vh;
    padding-bottom: calc(var(--mobile-nav-height) + var(--safe-area-bottom));
    overflow-x: hidden;
    line-height: 1.5;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== */
/* COMPONENT STYLES */
/* ==================== */

/* Glass Card */
.glass-card {
    background: var(--color-card);
    backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: var(--transition-default);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

/* Like Button */
.like-btn:hover i {
    transform: scale(1.2);
    transition: transform 0.2s;
}

/* Post Content */
.post-content {
    line-height: 1.6;
    word-break: break-word;
}

/* ==================== */
/* CUSTOM SCROLLBAR */
/* ==================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(23, 23, 23, 0.6);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== */
/* LAYOUT & CONTAINERS */
/* ==================== */
.responsive-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--container-padding-sm);
}

@media (min-width: 640px) {
    .responsive-container {
        max-width: 640px;
        padding: 0 var(--container-padding-md);
    }
}

@media (min-width: 768px) {
    .responsive-container {
        max-width: 768px;
        padding: 0 var(--container-padding-lg);
    }
}

@media (min-width: 1024px) {
    .responsive-container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .responsive-container {
        max-width: 1280px;
    }
}

/* ==================== */
/* HEADER STYLES */
/* ==================== */
header {
    height: var(--header-height-desktop);
    display: flex;
    align-items: center;
    padding: 0 var(--container-padding-lg);
    transition: all 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 40;
}

@media (max-width: 767px) {
    header {
        height: var(--header-height-mobile) !important;
        padding: 0 var(--container-padding-sm) !important;
    }
    
    header h1 {
        font-size: 1.1rem !important;
    }
    
    .header-right-content {
        transform: scale(0.9);
        transform-origin: right center;
    }
}

/* ==================== */
/* TYPOGRAPHY */
/* ==================== */
.fluid-text {
    font-size: clamp(0.875rem, 1.8vw, 1rem);
    line-height: 1.5;
}

.fluid-heading {
    font-size: clamp(1.25rem, 3.5vw, 1.875rem);
    line-height: 1.2;
}

.fluid-subheading {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
}

/* ==================== */
/* GRID SYSTEM */
/* ==================== */
.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1rem;
}

@media (max-width: 640px) {
    .responsive-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* ==================== */
/* MOBILE OPTIMIZATIONS */
/* ==================== */
@media (max-width: 767px) {
    /* Hide desktop sidebars */
    .desktop-only {
        display: none !important;
    }
    
    /* Adjust main content */
    main {
        padding-bottom: calc(var(--mobile-nav-height) + 30px + var(--safe-area-bottom)) !important;
        width: 100% !important;
        margin: 0 !important;
        padding-left: var(--container-padding-sm) !important;
        padding-right: var(--container-padding-sm) !important;
    }
    
    /* Adjust spacing */
    .glass-card {
        padding: 0.85rem !important;
        margin-bottom: 0.65rem !important;
    }
    
    .post-content {
        font-size: clamp(0.85rem, 1.9vw, 1rem);
    }
    
    /* Typography scaling */
    body {
        font-size: clamp(13px, 1.7vw, 16px);
    }
    
    h1 { font-size: clamp(1.3rem, 3.2vw, 2rem) !important; }
    h2 { font-size: clamp(1.1rem, 2.8vw, 1.5rem) !important; }
    h3 { font-size: clamp(1rem, 2.5vw, 1.25rem) !important; }
}

/* ==================== */
/* TABLET OPTIMIZATIONS */
/* ==================== */
@media (min-width: 768px) and (max-width: 1023px) {
    body {
        font-size: clamp(14px, 1.8vw, 16px);
    }
    
    .glass-card {
        padding: 1.1rem !important;
    }
    
    .responsive-container {
        padding-left: 1.75rem !important;
        padding-right: 1.75rem !important;
    }
}

/* ==================== */
/* DESKTOP OPTIMIZATIONS */
/* ==================== */
@media (min-width: 768px) {
    .mobile-only {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
    
    main {
        padding-bottom: 2rem !important;
    }
}

/* ==================== */
/* MOBILE NAVIGATION */
/* ==================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-nav-height);
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: var(--safe-area-bottom);
}

.mobile-nav-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 8px;
    margin: 0;
    list-style: none;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    text-decoration: none;
    font-size: clamp(0.65rem, 1.2vw, 0.75rem);
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 10px;
    min-width: 48px;
    height: 48px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-item.active {
    color: var(--color-secondary);
    background: rgba(96, 165, 250, 0.12);
    transform: translateY(-2px);
}

.mobile-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 3px;
    background: var(--color-secondary);
    border-radius: 50%;
}

.mobile-nav-item i {
    font-size: clamp(16px, 3vw, 20px);
    margin-bottom: 3px;
    transition: transform 0.3s;
}

.mobile-nav-item.active i {
    transform: scale(1.1);
}

/* More Menu */
.more-menu {
    display: none;
    position: fixed;
    bottom: calc(var(--mobile-nav-height) + 10px + var(--safe-area-bottom));
    right: 12px;
    background: rgba(23, 23, 23, 0.95);
    backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 6px 0;
    min-width: 180px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    overflow: hidden;
    animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.more-menu.show {
    display: block;
}

.more-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #e5e7eb;
    text-decoration: none;
    transition: all 0.2s;
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 12px;
}

.more-menu-item i {
	font-size: 1.1rem;
	min-width: 24px;
	text-align: center;
	margin-right: 12px;
}

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

.more-menu-item:hover {
    background: rgba(96, 165, 250, 0.15);
    color: var(--color-secondary);
    padding-left: 20px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* Show mobile nav on mobile only */
@media (max-width: 767px) {
    .mobile-bottom-nav {
        display: block;
    }
}

/* Post Dropdown Menu */
.post-dropdown-menu {
    display: none !important;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    width: 12rem;
    background: rgba(23, 23, 23, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 100;
    overflow: hidden;
    animation: slideUp 0.2s ease-out;
}

.post-dropdown-menu.show {
    display: block !important;
}

.post-dropdown-menu form,
.post-dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    cursor: pointer;
}

.post-dropdown-menu form:hover,
.post-dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
}

.post-dropdown-menu form:last-child,
.post-dropdown-menu a:last-child {
    border-bottom: none;
}

.post-dropdown-menu button[type="submit"] {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.post-dropdown-menu button[type="submit"] i,
.post-dropdown-menu a i {
    width: 1rem;
    text-align: center;
}

/* Mobile optimizations for dropdown */
@media (max-width: 767px) {
    .post-dropdown-menu {
        width: 10rem;
        font-size: 0.8rem;
    }
    
    .post-dropdown-menu form,
    .post-dropdown-menu a {
        padding: 0.6rem 0.8rem;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== */
/* UTILITY CLASSES */
/* ==================== */
.fluid-padding {
    padding: clamp(1rem, 2.5vw, 2rem);
}

.fluid-margin {
    margin: clamp(0.5rem, 1.8vw, 1.5rem);
}

.fluid-gap {
    gap: clamp(0.75rem, 2vw, 1.5rem);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}