/* ============================
   BlogTube Global Styles
============================ */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #f59e0b;
    --accent: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    --card-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --header-bg: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --gradient-primary: linear-gradient(135deg, #2563eb, #3b82f6);
    --gradient-accent: linear-gradient(135deg, #f59e0b, #f97316);
    --header-height: 70px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Poppins', sans-serif;
    background: var(--light);
    color: var(--dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================
   BlogTube Header
============================ */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--header-bg);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* Left Section */
.header-left {
    display: flex;
    align-items: center;
    min-width: 200px;
}

.menu-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 16px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--dark);
    transition: all 0.2s;
}

.menu-toggle:hover {
    background: var(--light);
    border-color: var(--primary);
    color: var(--primary);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
}

.logo-icon {
    color: var(--primary);
    font-size: 28px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text {
    font-family: 'Merriweather', serif;
    font-size: 26px;
    font-weight: 900;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--primary);
}

/* Center Section - Search */
.header-center {
    flex: 1;
    max-width: 680px;
    margin: 0 40px;
    display: flex;
}

.search-container {
    display: flex;
    flex: 1;
    max-width: 640px;
    margin: 0 auto;
}

.search-box {
    flex: 1;
    height: 44px;
    padding: 0 20px;
    background: var(--light);
    border: 2px solid var(--border);
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: var(--dark);
    font-size: 15px;
    outline: none;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s;
}

.search-box:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-button {
    width: 60px;
    height: 44px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
}

.search-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.write-button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gradient-accent);
    border: none;
    margin-left: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
}

.write-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    justify-content: flex-end;
}

.header-button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    position: relative;
    transition: all 0.2s;
}

.header-button:hover {
    background: var(--light);
    border-color: var(--primary);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--header-bg);
    font-weight: 600;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gradient-primary);
    overflow: hidden;
    cursor: pointer;
    margin-left: 8px;
    border: 2px solid var(--light);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================
   Main Blog Container
============================ */
.main-container {
    width: 90%;
    max-width: 1200px;
    margin: 100px auto 40px;
    display: flex;
    gap: 40px;
}

/* Left Column - Main Blog Content */
.blog-left-column {
    flex: 1;
    max-width: 800px;
}

/* Right Column - Related Blogs & Share */
.blog-right-column {
    width: 350px;
    position: sticky;
    top: 90px;
    height: fit-content;
}

/* Blog Content Container */
.blog-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.blog-title {
    font-family: 'Merriweather', serif;
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 15px;
    color: var(--dark);
    line-height: 1.3;
}

.meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    font-size: 0.95rem;
    color: var(--gray);
    flex-wrap: wrap;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 1.05rem;
}

.meta-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.featured-img {
    width: 100%;
    max-height: 500px;
    border-radius: 12px;
    margin: 25px 0;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

.blog-content {
    line-height: 1.8;
    font-size: 1.1rem;
    margin: 30px 0;
    color: var(--dark);
}

.blog-content p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* Hashtags Section */
.blog-hashtags {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

.blog-hashtags h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--dark);
    font-weight: 600;
}

.hashtag-link {
    display: inline-block;
    margin-right: 12px;
    margin-bottom: 10px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    background: rgba(37, 99, 235, 0.08);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    transition: all 0.3s;
    font-size: 0.9rem;
}

.hashtag-link:hover {
    background: var(--primary);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Actions Container */
.actions-container {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.actions-row {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

/* Like Section */
.like-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.like-container {
    display: flex;
    background: var(--light);
    border-radius: 12px;
    overflow: hidden;
    height: 48px;
    border: 1px solid var(--border);
}

.like-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    height: 100%;
    color: var(--gray);
    transition: all 0.2s ease;
    min-width: 120px;
}

.like-btn:hover:not(:disabled) {
    background: rgba(0,0,0,0.02);
}

.like-btn.liked {
    color: #ef4444;
}

.like-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.like-btn .icon {
    font-size: 18px;
}

.like-count {
    padding: 0 20px;
    border-left: 1px solid var(--border);
    display: flex;
    align-items: center;
    height: 100%;
    background: var(--light);
    font-weight: 600;
    color: var(--dark);
    min-width: 70px;
    justify-content: center;
}

/* Save Button */
.save-section {
    display: flex;
    align-items: center;
}

#save-blog-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 12px;
    border: none;
    background: var(--gradient-accent);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    height: 48px;
}

#save-blog-btn:hover:not(.saved) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#save-blog-btn.saved {
    background: #10b981;
    pointer-events: none;
}

/* Share Section */
.share-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.share-label {
    font-weight: 600;
    color: var(--gray);
    font-size: 0.95rem;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    color: white;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.share-facebook {
    background: #1877f2;
}

.share-twitter {
    background: #1da1f2;
}

.share-linkedin {
    background: #0a66c2;
}

.share-whatsapp {
    background: #25d366;
}

.share-copy {
    background: var(--primary);
}

/* Follow Button */
.follow-btn {
    margin-left: 10px;
    padding: 8px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: var(--light);
    color: var(--dark);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.follow-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.follow-btn:active {
    transform: translateY(0);
}

.follow-btn.following {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
}

/* Related Blogs Section */
.related-container {
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    max-width: 100%;
    word-wrap: break-word; /* Ye lamba text wrap kar dega */
}

.related-title {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px; /* Icon aur text ke beech space */
    margin-bottom: 15px;
    word-break: break-word; /* Agar text bahut lamba ho to wrap ho jaaye */
}


.related-title i {
    color: var(--primary);
}

.related-blog {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    transition: all 0.3s;
    margin-bottom: 15px;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
}

.related-blog:hover {
    background: var(--light);
    border-color: var(--border);
    transform: translateX(5px);
}

.related-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-content {
    flex: 1;
}

.related-blog-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 8px;
}

.related-stats {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 5px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Comments Container */
.comments-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    margin-top: 30px;
}

.comments-section h3 {
    margin-bottom: 25px;
    font-family: 'Merriweather', serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--dark);
    border-bottom: 2px solid var(--border);
    padding-bottom: 15px;
}

.comment-box {
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin-bottom: 20px;
    background: var(--light);
    border-radius: 0 12px 12px 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.comment-box:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.comment-box.hidden-comment {
    display: none;
}

.comment-box b {
    color: var(--dark);
    font-size: 1rem;
    margin-bottom: 8px;
    display: block;
}

.comment-box p {
    color: var(--dark);
    line-height: 1.6;
    margin: 10px 0;
}

.comment-box small {
    color: var(--gray);
    font-size: 0.85rem;
}

.comment-textarea {
    width: 100%;
    height: 120px;
    padding: 15px;
    margin: 20px 0 15px;
    border-radius: 12px;
    border: 1px solid var(--border);
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
    background: var(--light);
    color: var(--dark);
    transition: all 0.3s;
}

.comment-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comment-submit {
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: #fff;
    padding: 12px 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    font-size: 1rem;
}

.comment-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.show-more-btn {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--primary);
    padding: 12px 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    margin: 25px auto 0;
    width: 160px;
    text-align: center;
    font-size: 0.95rem;
}

.show-more-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.login-notice {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    text-align: center;
    color: var(--dark);
}

.login-notice a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.login-notice a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .blog-left-column, .blog-right-column {
        width: 100%;
        max-width: 100%;
    }
    
    .blog-right-column {
        position: static;
        order: 2;
    }
    
    .blog-left-column {
        order: 1;
    }
}

@media (max-width: 768px) {
    .main-container {
        width: 95%;
        margin: 80px auto 30px;
    }
    
    .top-header {
        padding: 0 16px;
    }
    
    .header-center {
        margin: 0 12px;
    }
    
    .write-button {
        display: none;
    }
    
    .header-right .header-button:nth-child(2) {
        display: none;
    }
    
    .blog-title {
        font-size: 2.2rem;
    }
    
    .blog-container, .comments-container, .actions-container, .related-container {
        padding: 25px 20px;
    }
    
    .actions-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .share-section {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }
    
    .share-label {
        display: none;
    }
    
    .like-container {
        width: 100%;
        max-width: 250px;
    }
    
    #save-blog-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .blog-title {
        font-size: 1.8rem;
    }
    
    .logo-text {
        font-size: 22px;
    }
    
    .related-blog {
        flex-direction: column;
    }
    
    .related-thumbnail {
        width: 100%;
        height: 150px;
    }
}

/* ============================
   Dark Mode
============================ */
/* ============================
   Dark Mode
============================ */
body.dark-mode {
    --light: #0f172a;
    --dark: #e5e7eb;
    --gray: #9ca3af;
    --light-gray: #1f2937;
    --card-bg: #1e293b;
    --sidebar-bg: #1e293b;
    --header-bg: #1e293b;
    --border: #374151;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
    background: var(--light);
    color: var(--dark);
}

body.dark-mode .related-container,
body.dark-mode .actions-container,
body.dark-mode .blog-container,
body.dark-mode .comments-container {
    background: var(--card-bg);
    color: var(--dark);
    border-color: var(--border);
}

body.dark-mode .related-blog:hover {
    background: var(--light-gray);
}

body.dark-mode .login-notice {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
    color: var(--dark);
}

body.dark-mode .hashtag-link {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.3);
    color: #93c5fd;
}

body.dark-mode .hashtag-link:hover {
    background: var(--primary);
    color: white;
}

body.dark-mode .comment-box {
    background: var(--light-gray);
    border-left-color: var(--primary);
}

body.dark-mode .comment-textarea {
    background: var(--light-gray);
    color: var(--dark);
    border-color: var(--border);
}

body.dark-mode .search-box {
    background: var(--light-gray);
    color: var(--dark);
    border-color: var(--border);
}

body.dark-mode .menu-toggle,
body.dark-mode .header-button {
    background: var(--light-gray);
    border-color: var(--border);
    color: var(--dark);
}

body.dark-mode .menu-toggle:hover,
body.dark-mode .header-button:hover {
    background: var(--card-bg);
    border-color: var(--primary);
}

body.dark-mode .like-container,
body.dark-mode .like-count {
    background: var(--light-gray);
    border-color: var(--border);
    color: var(--dark);
}

body.dark-mode .follow-btn:not(.following) {
    background: var(--light-gray);
    color: var(--dark);
    border-color: var(--border);
}

body.dark-mode .follow-btn.following {
    background: var(--gradient-primary);
    color: white;
}

body.dark-mode .show-more-btn {
    background: var(--light-gray);
    color: var(--primary);
    border-color: var(--border);
}

body.dark-mode .show-more-btn:hover {
    background: var(--primary);
    color: white;
}

body.dark-mode .search-box {
    background: #020617;
    color: var(--dark);
}/* Related Blogs Styles */
.blog-right-column {
    width: 100%;
    max-width: 400px;
    margin-left: 20px;
}

.related-container {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    word-wrap: break-word;
}

.related-title {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    word-break: break-word;
}

.related-blog {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    padding: 8px;
    border-radius: 6px;
}

.related-blog:hover {
    background: #f0f0f0;
}

.related-thumbnail img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.related-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.related-blog-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    word-break: break-word;
}

.related-meta {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

.related-stats {
    font-size: 0.8rem;
    margin-top: 4px;
    display: flex;
    gap: 10px;
    color: #444;
}

.stat-item i {
    margin-right: 4px;
}













.blog-dna {
    margin: 10px 0 20px;
    font-size: 0.9rem;
    color: var(--gray);
}
.dna-tag {
    display: inline-block;
    margin-right: 8px;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(37,99,235,0.1);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
}









/* Mood Box Styles */
.blog-mood-box {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    margin: 25px 0;
}

.blog-mood-box h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--dark);
    font-weight: 600;
}

.mood-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.mood-btn {
    padding: 10px 20px;
    border-radius: 50px;
    border: 2px solid var(--border);
    background: var(--light);
    color: var(--dark);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.mood-btn:hover:not(.selected) {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.mood-btn.selected {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.mood-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.mood-notice {
    margin-top: 10px;
    color: var(--gray);
    font-size: 0.9rem;
}

/* Dark mode adjustments */
body.dark-mode .mood-btn:not(.selected) {
    background: var(--light-gray);
    color: var(--dark);
}