/* Blogify Post Detail Popup Modern Card Styles */
.popup-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%);
    border-radius: 28px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    padding: 0 0 2.5rem 0;
    max-width: 100%;
    width: 100%;
    margin: 0;
    overflow: hidden;
    animation: popupFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
}

.popup-image {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    display: block;
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.popup-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
}

.popup-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 900;
    margin: 2rem 1.5rem 1rem 1.5rem;
    color: #1a1a2e;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    letter-spacing: -0.5px;
}

.popup-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 1.5rem;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #1a8917, #0f5a0d);
    border-radius: 2px;
}

.popup-meta-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 0 1.5rem 1.5rem 1.5rem;
    font-size: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.popup-author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a8917 0%, #0f5a0d 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    box-shadow: 
        0 8px 25px rgba(26, 137, 23, 0.25),
        0 0 0 2px rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.popup-author-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.popup-author-avatar:hover::before {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

.popup-author-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.popup-author-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
}
.popup-date {
    color: var(--text-light);
    font-size: 0.95rem;
}
.popup-meta-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
}

.popup-meta-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

.popup-meta-stats span:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.popup-meta-stats i {
    margin-right: 0.4em;
    color: var(--primary-color);
}

.popup-body {
    margin: 0 1.5rem 1.5rem 1.5rem;
    color: #374151;
    font-size: 1.1rem;
    line-height: 1.8;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}
.popup-body p {
    margin-bottom: 1.1em;
}

.popup-actions {
    margin: 1.5rem 1.2rem 0 1.2rem;
    display: flex;
    gap: 1rem;
}
.center-actions {
    justify-content: center;
    width: 100%;
    display: flex !important;
    align-items: center;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 600px) {
    .popup-card {
        max-width: 98vw;
        border-radius: 12px;
        padding-bottom: 1.2rem;
    }
    .popup-title, .popup-meta-row, .popup-body, .popup-actions {
        margin-left: 0.7rem;
        margin-right: 0.7rem;
    }
}
.read-detail-btn {
    background: linear-gradient(135deg, #1a8917 0%, #0f5a0d 100%);
    color: #fff;
    border: none;
    border-radius: 28px;
    padding: 1rem 2.5rem;
    font-weight: 800;
    font-size: 1.1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 
        0 8px 25px rgba(26, 137, 23, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
    cursor: pointer;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.read-detail-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.read-detail-btn:hover::before {
    left: 100%;
}
.read-detail-btn:hover {
    background: linear-gradient(135deg, #0f5a0d 0%, #1a8917 100%);
    color: #fff;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 20px 40px rgba(26, 137, 23, 0.35),
        0 0 0 2px rgba(255, 255, 255, 0.2);
}
/* Gradient for all main buttons */
.write-btn, .load-more-btn, .btn-primary, .follow-btn {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.write-btn:hover, .load-more-btn:hover, .btn-primary:hover, .follow-btn:hover {
    background: var(--gradient-secondary);
    color: #fff;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 18px rgba(26,137,23,0.18);
}
.popup-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    z-index: 10;
}
.popup-close-btn:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: translateY(40px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
/* Limit image size in post detail popup modal */
.post-detail-image {
    display: block;
    max-width: 100%;
    max-height: 320px;
    width: auto;
    height: auto;
    margin: 1.5rem auto 0 auto;
    border-radius: var(--border-radius-lg);
    object-fit: cover;
    box-shadow: var(--shadow-md);
}
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a8917;
    --primary-dark: #0f5a0d;
    --secondary-color: #f59e0b;
    --accent-color: #ec4899;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    
    --text-primary: #242424;
    --text-secondary: #6b6b6b;
    --text-light: #9ca3af;
    
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f3f4f6;
    --bg-dark: #111827;
    
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --gradient-primary: linear-gradient(135deg, #1a8917 0%, #0f5a0d 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-accent: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overflow: hidden;
    animation: backgroundShift 12s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { 
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    }
    25% { 
        background: linear-gradient(135deg, #16213e 0%, #0f3460 50%, #533483 100%);
    }
    50% { 
        background: linear-gradient(135deg, #0f3460 0%, #533483 50%, #2c3e50 100%);
    }
    75% { 
        background: linear-gradient(135deg, #533483 0%, #2c3e50 50%, #34495e 100%);
    }
}

/* Particle System */
.particle-system {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: particleFloat 8s linear infinite;
}

.particle-1 { top: 10%; left: 20%; animation-delay: 0s; }
.particle-2 { top: 30%; right: 25%; animation-delay: 1s; }
.particle-3 { bottom: 40%; left: 15%; animation-delay: 2s; }
.particle-4 { bottom: 20%; right: 30%; animation-delay: 3s; }
.particle-5 { top: 50%; left: 50%; animation-delay: 4s; }
.particle-6 { top: 70%; right: 10%; animation-delay: 5s; }
.particle-7 { bottom: 60%; left: 40%; animation-delay: 6s; }
.particle-8 { top: 80%; right: 50%; animation-delay: 7s; }

@keyframes particleFloat {
    0% { transform: translateY(0px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* Energy Waves */
.energy-waves {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.wave {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: waveExpand 8s ease-in-out infinite;
}

.wave-1 {
    top: -50%;
    left: -50%;
    animation-delay: 0s;
}

.wave-2 {
    top: -50%;
    left: -50%;
    animation-delay: 2.7s;
}

.wave-3 {
    top: -50%;
    left: -50%;
    animation-delay: 5.4s;
}

@keyframes waveExpand {
    0% { 
        transform: scale(0); 
        opacity: 0.8; 
    }
    100% { 
        transform: scale(1); 
        opacity: 0; 
    }
}



/* Lightning Effects */
.lightning-container {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.lightning {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    opacity: 0;
    animation: lightningFlash 4s ease-in-out infinite;
}

.lightning-1 {
    animation-delay: 0s;
    transform: skewX(-15deg);
}

.lightning-2 {
    animation-delay: 1.3s;
    transform: skewX(15deg);
}

.lightning-3 {
    animation-delay: 2.6s;
    transform: skewX(-10deg);
}

@keyframes lightningFlash {
    0%, 100% { opacity: 0; }
    5%, 15% { opacity: 0.8; }
    20% { opacity: 0; }
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Floating Blog Cards */
.loading-bg-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 24px;
    width: 220px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: floatCard 6s ease-in-out infinite;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.floating-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.floating-card:hover .card-glow {
    opacity: 1;
}

.floating-card:hover .card-image {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.card-content {
    text-align: center;
}

.card-image {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    margin: 0 auto 18px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.card-icon {
    font-size: 1.8rem;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1); 
        filter: brightness(1);
    }
    50% { 
        transform: translateY(-8px) scale(1.05); 
        filter: brightness(1.2);
    }
}

.card-text h3 {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    font-family: 'Inter', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.card-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Card positions and animations */
.card-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 20%;
    left: 75%;
    animation-delay: 1.2s;
}

.card-3 {
    top: 35%;
    left: 8%;
    animation-delay: 2.4s;
}

.card-4 {
    top: 45%;
    left: 75%;
    animation-delay: 3.6s;
}

.card-5 {
    top: 60%;
    left: 12%;
    animation-delay: 4.8s;
}

.card-6 {
    top: 70%;
    left: 75%;
    animation-delay: 6s;
}

.card-7 {
    top: 80%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 7.2s;
}



@keyframes floatCard {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) translate(var(--parallax-x, 0px), var(--parallax-y, 0px)); 
        opacity: 0.7;
    }
    50% { 
        transform: translateY(-20px) rotate(2deg) translate(var(--parallax-x, 0px), var(--parallax-y, 0px)); 
        opacity: 1;
    }
}



/* Geometric Shapes */
.geometric-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: shapeRotate 10s linear infinite;
}

.shape-1 {
    top: 15%;
    left: 5%;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation-delay: 0s;
}

.shape-2 {
    top: 75%;
    right: 8%;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    border-radius: 50%;
    animation-delay: 2s;
}

.shape-3 {
    bottom: 15%;
    left: 50%;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%);
    animation-delay: 4s;
}

.shape-4 {
    top: 45%;
    right: 5%;
    width: 25px;
    height: 25px;
    background: linear-gradient(135deg, #fa709a, #fee140);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation-delay: 6s;
}

@keyframes shapeRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}





.loading-content {
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.logo-container {
    /* Fixed height container for logo to prevent bouncing */
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-animation {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    font-weight: 700;
    animation: logoFloat 2s ease-in-out infinite;
    position: relative;
    perspective: 1000px;
}

.logo-3d-container {
    position: relative;
    transform-style: preserve-3d;
    animation: logo3DRotate 8s ease-in-out infinite;
}

.logo-3d-layer {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.logo-3d-back {
    transform: translateZ(-20px);
    opacity: 0.3;
    filter: blur(2px);
    color: #ff6b6b;
}

.logo-3d-middle {
    transform: translateZ(-10px);
    opacity: 0.6;
    filter: blur(1px);
    color: #4ecdc4;
}

.logo-3d-front {
    transform: translateZ(0px);
    opacity: 1;
    color: white;
}











@keyframes logo3DRotate {
    0%, 100% { transform: rotateY(0deg) rotateX(0deg); }
    25% { transform: rotateY(15deg) rotateX(5deg); }
    50% { transform: rotateY(0deg) rotateX(10deg); }
    75% { transform: rotateY(-15deg) rotateX(5deg); }
}



.logo-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: logoGlow 3s ease-in-out infinite;
    pointer-events: none;
}

.logo-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.logo-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: logoParticle 4s ease-in-out infinite;
}

.logo-particle:nth-child(1) {
    top: -10px;
    left: 50%;
    animation-delay: 0s;
}

.logo-particle:nth-child(2) {
    top: 50%;
    right: -10px;
    animation-delay: 1.3s;
}

.logo-particle:nth-child(3) {
    bottom: -10px;
    left: 50%;
    animation-delay: 2.6s;
}

@keyframes logoGlow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

@keyframes logoParticle {
    0%, 100% { 
        transform: translate(0, 0) scale(1); 
        opacity: 0.8; 
    }
    50% { 
        transform: translate(0, -20px) scale(1.5); 
        opacity: 0.3; 
    }
}

.logo-animation i {
    font-size: 2.5rem;
    animation: starSpin 3s linear infinite;
}

.message-container {
    /* Fixed height container for messages to prevent bouncing */
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-message {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.9;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.message-content {
    position: relative;
    display: inline-block;
}

.message-text {
    position: relative;
    z-index: 2;
    display: inline-block;
    animation: messageGlow 2s ease-in-out infinite;
}

.message-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.msg-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    animation: msgParticleFloat 3s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.6);
}

.msg-particle:nth-child(1) {
    top: -10px;
    left: 20%;
    animation-delay: 0s;
}

.msg-particle:nth-child(2) {
    top: -5px;
    right: 20%;
    animation-delay: 1s;
}

.msg-particle:nth-child(3) {
    bottom: -10px;
    left: 50%;
    animation-delay: 2s;
}

.message-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: messageGlowPulse 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes messageGlow {
    0%, 100% { 
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.6);
        transform: scale(1.05);
    }
}

@keyframes messageGlowPulse {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.6; 
        transform: scale(1.2); 
    }
}

@keyframes msgParticleFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1); 
        opacity: 0.8; 
    }
    50% { 
        transform: translateY(-15px) scale(1.5); 
        opacity: 0.3; 
    }
}

@keyframes messageEntrance {
    0% { 
        transform: scale(0.8) rotate(-5deg);
        filter: blur(0px);
        opacity: 0;
    }
    50% { 
        transform: scale(1.1) rotate(2deg);
        filter: blur(0px);
        opacity: 1;
    }
    100% { 
        transform: scale(1) rotate(0deg);
        filter: blur(0px);
        opacity: 1;
    }
}

.loading-message span {
    display: inline-block;
    animation: messageFade 0.5s ease-in-out;
    /* Ensure consistent text rendering */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Progress Bar */
.loading-progress {
    margin-top: 1rem;
    width: 300px;
}

.progress-container {
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #4facfe 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progressFill 4s ease-in-out;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

.progress-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.progress-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: progressParticle 3s ease-in-out infinite;
}

.progress-particle:nth-child(1) {
    top: 50%;
    left: 20%;
    animation-delay: 0s;
}

.progress-particle:nth-child(2) {
    top: 50%;
    left: 60%;
    animation-delay: 1s;
}

.progress-particle:nth-child(3) {
    top: 50%;
    left: 80%;
    animation-delay: 2s;
}

.progress-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes progressFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes progressParticle {
    0%, 100% { 
        transform: translateY(0px) scale(1); 
        opacity: 0.8; 
    }
    50% { 
        transform: translateY(-10px) scale(1.5); 
        opacity: 0.3; 
    }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes starSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes messageFade {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Header */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 60px;
    gap: 0.5rem;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.8rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Search */
.search-container {
    flex: 1 1 0%;
    min-width: 0;
    margin: 0 2rem;
    max-width: none;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(26, 137, 23, 0.1);
}

.search-box i {
    position: absolute;
    left: 16px;
    color: var(--text-light);
    z-index: 1;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
    margin-left: 0;
}

.write-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 14px;
}

.write-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.notification-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.notification-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.user-avatar:hover {
    transform: scale(1.05);
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 290px 1fr 300px;
    gap: 0;
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    min-height: calc(100vh - 60px);
}

/* Left Sidebar */
.left-sidebar {
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    padding: 2.2rem 1.5rem 2.2rem 1.5rem;
    overflow-y: auto;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    width: 290px;
    min-width: 290px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.03);
}

.sidebar-nav {
    padding: 0 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    font-size: 14px;
}

.nav-link:hover,
.nav-item.active .nav-link {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.nav-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.sidebar-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-link:hover {
    text-decoration: underline;
}

/* Main Content */
.main-content {
    background: var(--bg-primary);
    padding: 2rem;
    overflow-y: auto;
}

.content-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.content-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--text-primary);
    border-bottom-color: var(--primary-color);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.content-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.filter-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    font-size: 14px;
    cursor: pointer;
}

.view-toggle {
    display: flex;
    gap: 0.25rem;
}

.view-btn {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.view-btn.active,
.view-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Blog Posts */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-posts.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.post {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.post:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.post.list-view {
    display: flex;
    height: 200px;
}

.post.list-view .post-image {
    width: 200px;
    height: 100%;
    flex-shrink: 0;
}

.post.list-view .post-content {
    flex: 1;
    padding: 1.5rem;
}

.post-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post:hover .post-image img {
    transform: scale(1.05);
}

.post-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-content {
    padding: 1.5rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-light);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.post-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.load-more-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.load-more-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-posts-content i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-posts-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Right Sidebar */
.right-sidebar {
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    padding: 2.2rem 1.5rem 2.2rem 1.5rem;
    overflow-y: auto;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
}

.sidebar-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.sidebar-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Staff Picks */
.staff-picks {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pick-item {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.pick-item:hover {
    background: var(--bg-tertiary);
}

.pick-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.pick-author {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.pick-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.pick-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Topics Grid */
.topics-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.topic-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.topic-tag:hover {
    background: var(--primary-color);
    color: white;
}

/* Follow Suggestions */
.follow-suggestions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.follow-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.follow-item:hover {
    background: var(--bg-tertiary);
}

.follow-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.follow-info {
    flex: 1;
}

.follow-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.follow-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.follow-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.75rem;
    font-weight: 500;
}

.follow-btn:hover {
    background: var(--primary-dark);
}

/* Footer Content */
.footer-content {
    margin-top: auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.copyright {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
}

.copyright i {
    color: var(--error-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(26, 137, 23, 0.3) 100%);
    backdrop-filter: blur(20px);
    z-index: 3000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.modal.active {
    opacity: 1;
}

.modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    margin: 2% auto;
    padding: 0;
    border-radius: 24px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(-100px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, #1a8917 0%, #0f5a0d 100%);
    color: white;
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
    letter-spacing: -0.5px;
}

.close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
    color: white;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

.close:hover {
    color: #1a8917;
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Form Styles */
.post-form {
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 250, 252, 0.9) 100%);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: #1a1a2e;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.form-group label::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1a8917, #0f5a0d);
    transition: width 0.3s ease;
}

.form-group input:focus + label::after,
.form-group select:focus + label::after,
.form-group textarea:focus + label::after {
    width: 100%;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a8917;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(26, 137, 23, 0.15),
        0 0 0 4px rgba(26, 137, 23, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

.content-counter {
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-secondary {
    padding: 16px 32px;
    border: 2px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.9);
    color: #64748b;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    backdrop-filter: blur(10px);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-secondary:hover {
    border-color: #1a8917;
    color: #1a8917;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 137, 23, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #1a8917 0%, #0f5a0d 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 
        0 8px 25px rgba(26, 137, 23, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0f5a0d 0%, #1a8917 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(26, 137, 23, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* Post Detail Modal */
.post-detail-content {
    max-width: 900px;
    max-height: 90vh;
    padding: 0;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(26,137,23,0.10), 0 1.5px 8px rgba(26,137,23,0.06);
    border: 1.5px solid #e6f4ea;
    overflow: hidden;
    position: relative;
    z-index: 1002;
}
}

.post-detail-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #1a8917, #0f5a0d, #1a8917);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

.post-detail-content .close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 20;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1a8917;
    padding: 12px;
    border-radius: 16px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-detail-content .close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

#post-detail-content {
    padding: 3rem 2.5rem 2.5rem 2.5rem;
    position: relative;
    max-height: calc(90vh - 6rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(26, 137, 23, 0.3) transparent;
    scroll-behavior: smooth;
}

#post-detail-content::-webkit-scrollbar {
    width: 8px;
}

#post-detail-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

#post-detail-content::-webkit-scrollbar-thumb {
    background: rgba(26, 137, 23, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

#post-detail-content::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 137, 23, 0.5);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Floating particles for post detail */
.post-detail-content::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 4px;
    height: 4px;
    background: rgba(26, 137, 23, 0.6);
    border-radius: 50%;
    animation: floatParticle 4s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(26, 137, 23, 0.4);
}

.post-detail-content::before {
    content: '';
    position: absolute;
    top: 60%;
    left: 5%;
    width: 6px;
    height: 6px;
    background: rgba(26, 137, 23, 0.4);
    border-radius: 50%;
    animation: floatParticle 6s ease-in-out infinite reverse;
    box-shadow: 0 0 15px rgba(26, 137, 23, 0.3);
}

@keyframes floatParticle {
    0%, 100% { 
        transform: translateY(0px) scale(1);
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }
}

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 200px 1fr 220px;
    }
    .left-sidebar {
        width: 200px;
        min-width: 200px;
    }
}

@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .left-sidebar {
        position: fixed;
        left: -200px;
        top: 60px;
        width: 200px;
        min-width: 200px;
        z-index: 1000;
        transition: var(--transition);
    }
    
    .left-sidebar.active {
        left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .right-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }
    
    .search-container {
        margin: 0 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .content-filters {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .blog-posts.grid-view {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 10px;
    }
    
    .search-container {
        display: none;
    }
    
    .main-content {
        padding: 0.5rem;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .post-detail-content {
        max-width: 95vw;
        border-radius: 20px;
    }
    
    #post-detail-content {
        padding: 2rem 1.5rem 1.5rem 1.5rem;
    }
    
    .popup-title {
        font-size: 1.8rem;
        margin: 1.5rem 1rem 0.8rem 1rem;
    }
    
    .popup-meta-row {
        margin: 0 1rem 1rem 1rem;
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .popup-meta-stats {
        margin-left: 0;
        gap: 1rem;
    }
    
    .popup-body {
        margin: 0 1rem 1rem 1rem;
        padding: 1rem;
    }
    
    .popup-actions {
        margin: 1rem 1rem 0 1rem;
        justify-content: center;
    }
    
    .read-detail-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    .post-form {
        padding: 1rem;
    }
    
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* Enhanced Popup Animations */
@keyframes popupFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
        filter: blur(10px);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1.02);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Enhanced hover effects for interactive elements */
.popup-card:hover .popup-image {
    transform: scale(1.02);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 0 0 2px rgba(255, 255, 255, 0.2);
}

.popup-meta-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.popup-body:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
} 