/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    height: 58px !important;
    width: 20px !important;
    max-width: 20px !important;
    max-height: 58px !important;
    min-width: 20px !important;
    min-height: 58px !important;
    object-fit: contain !important;
    border-radius: 4px;
    display: inline-block !important;
}

/* Utility classes for logo sizing */
.h-20 {
    height: 5rem !important; /* 80px */
}

.max-w-58 {
    max-width: 14.5rem !important; /* 232px */
}

.object-contain {
    object-fit: contain !important;
}

.admin-link {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white !important;
    border-radius: 6px;
    padding: 8px 12px !important;
    font-weight: 600;
}

.admin-link:hover {
    background: linear-gradient(135deg, #F57C00 0%, #E65100 100%);
    transform: translateY(-1px);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link:hover {
    background: #f8f9fa;
    color: #667eea;
}

.nav-link.btn-outline {
    border: 2px solid #667eea;
    color: #667eea;
}

.nav-link.btn-outline:hover {
    background: #667eea;
    color: white;
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: all 0.3s;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check input[type="checkbox"] {
    width: auto;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

/* Grid */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 80px);
    padding-top: 2rem;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #667eea;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #667eea;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    transform: translateY(-3px);
    background: #5a6fd8;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #555;
    color: #ccc;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #667eea;
}

.footer-links span {
    color: #666;
}

.footer-tagline {
    text-align: center;
    font-size: 0.9rem;
    color: #999;
    font-style: italic;
}

.footer-tagline p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 1rem;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .footer-links {
        justify-content: center;
        font-size: 0.8rem;
    }
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

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

.w-full { width: 100%; }
.h-full { height: 100%; }

/* Posts Styles */
.posts-header {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.posts-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.posts-header h1 {
    color: #333;
    margin: 0;
}

.posts-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.posts-feed {
    max-width: 600px;
    margin: 0 auto;
}

.post-card {
    background: white;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.post-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.author-info time {
    font-size: 0.85rem;
    color: #666;
}

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

.post-title {
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
    line-height: 1.4;
}

.post-title a {
    color: #333;
    text-decoration: none;
}

.post-title a:hover {
    color: #667eea;
}

.post-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.post-image {
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-decoration: none;
}

.action-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.like-btn.liked {
    color: #e74c3c;
}

.edit-btn {
    color: #667eea !important;
}

.edit-btn:hover {
    background: #f0f0f0;
    color: #5a6fd8 !important;
}

.post-owner-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.post-owner-actions .btn {
    font-size: 0.9rem;
}

.post-views {
    margin-left: auto;
    color: #999;
    font-size: 0.85rem;
}

/* Create Post Form */
.create-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.create-post-form {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.image-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.image-upload-area:hover,
.image-upload-area.drag-over {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-placeholder i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.upload-placeholder p {
    margin: 0 0 0.5rem 0;
    color: #666;
}

.upload-placeholder small {
    color: #999;
}

.paste-hint {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    color: #667eea;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.paste-hint i {
    font-size: 1rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
    max-width: 350px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left-color: #28a745;
    color: #155724;
}

.toast-success i {
    color: #28a745;
}

.toast-info {
    border-left-color: #667eea;
    color: #004085;
}

.toast-info i {
    color: #667eea;
}

.toast span {
    font-weight: 500;
}

/* Edit Post Styles */
.edit-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.edit-post-form {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.current-image {
    margin-bottom: 1.5rem;
}

.current-image h4 {
    margin-bottom: 1rem;
    color: #333;
}

.image-preview-current {
    position: relative;
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-preview-current img {
    max-width: 300px;
    max-height: 200px;
    display: block;
}

.image-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.form-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.form-divider span {
    background: white;
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #e74c3c;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-body {
    padding: 1.5rem 2rem;
}

.modal-body p {
    margin-bottom: 1rem;
}

.warning-text {
    color: #e74c3c;
    font-weight: 500;
    font-style: italic;
}

.modal-footer {
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Button Variants */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: 2px solid #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
    border-color: #c0392b;
}

/* Social Login Styles */
.btn-facebook {
    background: #1877f2;
    color: white;
    border: 2px solid #1877f2;
}

.btn-facebook:hover {
    background: #166fe5;
    border-color: #166fe5;
    color: white;
}

.login-options {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.social-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #1877f2;
}

.social-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.social-logout {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: auto;
}

.social-logout:hover {
    color: #333;
    text-decoration: underline;
}

/* Auto-linked URLs */
.auto-link {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px dotted #667eea;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
}

.auto-link:hover {
    color: #5a6fd8;
    text-decoration: none;
    border-bottom: 1px solid #5a6fd8;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    transform: translateY(-1px);
}

.auto-link:before {
    content: "🔗";
    font-size: 0.8em;
    margin-right: 0.25rem;
    opacity: 0.7;
}

/* Comment links - more subtle styling */
.comment-link {
    font-size: 0.9em;
    border-bottom: 1px dotted #999;
    color: #555;
}

.comment-link:hover {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.comment-link:before {
    content: "↗";
    font-size: 0.7em;
    margin-right: 0.2rem;
}

/* Link security indicator */
.auto-link[href^="https://"]:after {
    content: "🔒";
    font-size: 0.7em;
    margin-left: 0.25rem;
    opacity: 0.5;
}

/* Different link types */
.auto-link[href*="youtube.com"]:before,
.auto-link[href*="youtu.be"]:before {
    content: "📺";
}

.auto-link[href*="github.com"]:before {
    content: "💻";
}

.auto-link[href*="twitter.com"]:before,
.auto-link[href*="x.com"]:before {
    content: "🐦";
}

.auto-link[href*="facebook.com"]:before {
    content: "📘";
}

.auto-link[href*="instagram.com"]:before {
    content: "📷";
}

.auto-link[href*="linkedin.com"]:before {
    content: "💼";
}

.auto-link[href*="amazon.com"]:before,
.auto-link[href*="ebay.com"]:before,
.auto-link[href*="etsy.com"]:before {
    content: "🛒";
}

.auto-link[href*="wikipedia.org"]:before {
    content: "📖";
}

.auto-link[href*="spotify.com"]:before,
.auto-link[href*="soundcloud.com"]:before {
    content: "🎵";
}

.auto-link[href$=".pdf"]:before {
    content: "📄";
}

.auto-link[href$=".zip"]:before,
.auto-link[href$=".rar"]:before,
.auto-link[href$=".7z"]:before {
    content: "📦";
}

/* Post content formatting */
.post-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-text p:last-child {
    margin-bottom: 0;
}

/* Related Posts Section */
.related-posts-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.related-posts-section h3 {
    margin-bottom: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.related-post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.related-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.related-post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-post-image {
    height: 150px;
    overflow: hidden;
    background: #f8f9fa;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.related-post-content {
    padding: 1rem;
}

.related-post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: #888;
}

.related-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.related-post-meta i {
    font-size: 0.7rem;
}

.related-posts-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .related-post-meta {
        gap: 0.5rem;
        font-size: 0.75rem;
    }
}

/* YouTube Video Previews */
.youtube-preview {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: #000;
    max-width: 560px;
}

.youtube-thumbnail {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.youtube-thumbnail:hover {
    transform: scale(1.02);
}

.youtube-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.youtube-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
}

.youtube-thumbnail:hover .youtube-play-button {
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube-info {
    padding: 1rem;
    background: #fff;
}

.youtube-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #333;
    line-height: 1.3;
}

.youtube-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* YouTube Embed (when loaded) */
.youtube-embed {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.youtube-embed iframe {
    border-radius: 12px;
}

/* Regular iframe embeds in content */
.post-content iframe,
.blog-post iframe {
    max-width: 100%;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* YouTube iframe specific styling */
.post-content iframe[src*="youtube.com"],
.blog-post iframe[src*="youtube.com"] {
    width: 100%;
    height: 315px;
    min-height: 200px;
    aspect-ratio: 16/9;
}

/* Responsive iframe container */
.iframe-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 1.5rem 0;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Content Images */
.content-image {
    margin: 1.5rem 0;
    text-align: center;
}

.content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    cursor: pointer;
}

.image-modal img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.image-modal .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.image-modal .close:hover {
    opacity: 0.7;
}

/* Multiple Images Grid */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.images-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.images-grid img:hover {
    transform: scale(1.05);
}

/* Responsive adjustments for media */
@media (max-width: 768px) {
    .youtube-preview {
        margin: 1rem 0;
    }

    .youtube-info {
        padding: 0.75rem;
    }

    .youtube-info h4 {
        font-size: 1rem;
    }

    .content-image {
        margin: 1rem 0;
    }

    .images-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
        margin: 1rem 0;
    }

    .images-grid img {
        height: 150px;
    }
}

/* Image URLs Section */
.image-urls-section {
    margin-top: 1rem;
}

.image-urls-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.image-urls-section textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 2px dashed #ddd;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.image-urls-section textarea:focus {
    border-color: #667eea;
    outline: none;
}

.url-images-preview {
    margin-top: 1rem;
}

.url-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.url-image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    aspect-ratio: 1;
    transition: transform 0.2s ease;
}

.url-image-item.loaded {
    background: transparent;
}

.url-image-item.error {
    background: #fee;
    border: 2px dashed #f56565;
    display: flex;
    align-items: center;
    justify-content: center;
}

.url-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.url-image-item:hover {
    transform: scale(1.02);
}

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

.remove-url-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 0.8rem;
}

.url-image-item:hover .remove-url-image {
    opacity: 1;
}

.remove-url-image:hover {
    background: rgba(220, 53, 69, 0.9);
}

.error-message {
    text-align: center;
    color: #f56565;
    font-size: 0.8rem;
    padding: 0.5rem;
}

.error-message i {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

/* Responsive adjustments for image URLs */
@media (max-width: 768px) {
    .url-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
    }

    .image-urls-section textarea {
        font-size: 0.8rem;
    }
}

/* Post Snippet Enhancements */
.post-excerpt {
    line-height: 1.6;
    color: #555;
    margin-bottom: 1rem;
}

.read-more-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 2px solid #667eea;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: transparent;
}

.read-more-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.read-more-btn i {
    transition: transform 0.3s ease;
}

.read-more-btn:hover i {
    transform: translateX(3px);
}

/* Featured Image in Post Cards */
.post-featured-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.post-card:hover .post-featured-image {
    transform: scale(1.02);
}

/* Rich Content Styling */
.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4,
.rich-content h5,
.rich-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #333;
    line-height: 1.3;
}

.rich-content h1 {
    font-size: 2.5rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

.rich-content h2 {
    font-size: 2rem;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.3rem;
}

.rich-content h3 {
    font-size: 1.5rem;
    color: #667eea;
}

.rich-content h4 {
    font-size: 1.25rem;
}

.rich-content h5 {
    font-size: 1.1rem;
}

.rich-content h6 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rich-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
}

.rich-content code {
    background: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #d63384;
}

.rich-content pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #e9ecef;
}

.rich-content pre code {
    background: none;
    padding: 0;
    color: #333;
}

.rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.rich-content th,
.rich-content td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.rich-content th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.rich-content tr:hover {
    background: #f8f9fa;
}

/* Responsive adjustments for rich content */
@media (max-width: 768px) {
    .rich-content h1 {
        font-size: 2rem;
    }

    .rich-content h2 {
        font-size: 1.5rem;
    }

    .rich-content h3 {
        font-size: 1.25rem;
    }

    .read-more-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .post-featured-image {
        height: 150px;
    }
}

/* Content Mode Toggle */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.content-mode-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.3s ease;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #667eea;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.toggle-switch input:checked ~ .toggle-label {
    color: #667eea;
}

/* HTML Mode Styling */
.form-control.html-mode {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    background: #f8f9fa;
    border: 2px solid #667eea;
}

.html-help {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #e8f2ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
}

.html-help strong {
    color: #667eea;
}

/* Responsive adjustments for toggle */
@media (max-width: 768px) {
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .toggle-label {
        font-size: 0.8rem;
    }
}

.image-preview {
    position: relative;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Post Detail */
.post-detail {
    max-width: 800px;
    margin: 0 auto;
}

.post-full {
    background: white;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.post-full .post-header {
    padding: 2rem 2rem 1rem;
}

.post-full .post-content {
    padding: 0 2rem 1rem;
}

.post-full .post-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.post-full .post-text {
    font-size: 1.1rem;
    line-height: 1.7;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-share {
    display: flex;
    gap: 0.5rem;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s;
}

.social-btn:hover {
    transform: scale(1.1);
}

.social-btn.facebook { background: #1877f2; }
.social-btn.twitter { background: #1da1f2; }
.social-btn.whatsapp { background: #25d366; }
.social-btn.linkedin { background: #0077b5; }
.social-btn.copy-link { background: #666; }

/* Comments */
.comments-section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.comments-section h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-input {
    display: flex;
    gap: 12px;
}

.commenter-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
}

.commenter-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-field {
    flex: 1;
}

.comment-field textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    resize: vertical;
    margin-bottom: 10px;
}

.comment {
    display: flex;
    gap: 12px;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.comment-header h5 {
    margin: 0;
    font-size: 0.9rem;
    color: #333;
}

.comment-header time {
    font-size: 0.8rem;
    color: #666;
}

.comment-text {
    color: #555;
    line-height: 1.5;
}

.no-comments {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.no-comments i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ccc;
}

.login-prompt {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.login-prompt a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

/* Posts Responsive Styles */
@media (max-width: 768px) {
    .posts-header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .posts-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .create-post-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .post-card,
    .post-full,
    .comments-section {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
    }

    .post-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .social-share {
        flex-wrap: wrap;
    }

    .comment-input {
        flex-direction: column;
    }

    .commenter-avatar {
        align-self: flex-start;
    }

    .post-full .post-title {
        font-size: 1.5rem;
    }

    .create-post-form {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
    }
}
