:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --background: #0f172a;
    --surface: #1e293b;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header:not(.post-header) {
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.post-header {
    margin-bottom: 2rem;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-bar {
    flex: 1;
    margin: 0 2rem;
    max-width: 400px;
}

.search-bar input {
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-family: inherit;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    font-weight: 500;
    color: var(--text-muted);
}

nav a:hover {
    color: var(--text);
}

/* Main */
main {
    padding: 3rem 0;
    min-height: 80vh;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    line-height: 1.25;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }

/* Home Grid */
.home-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.section-title {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--surface);
    padding-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Post Cards */
.post-list {
    display: grid;
    gap: 2rem;
}

.post-card {
    background-color: var(--surface);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.post-image {
    width: 100%;
    height: 200px; /* simple fixed height for now */
    background-color: #333; /* placeholder */
    object-fit: cover;
}

.post-image.full {
    width: 100%;
    height: auto;
    max-height: 500px;
}


.has-white-color{display:none;}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    gap: 1rem;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: white;
    border-radius: 0.5rem;
    font-weight: 500;
}

.btn:hover {
    background-color: var(--primary-dark);
    color: white;
}

/* Sidebar */
aside {
    position: sticky;
    top: 6rem;
    align-self: flex-start;
}

.sidebar-section {
    margin-bottom: 3rem;
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.category-list, .featured-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text);
    font-family: inherit;
    transition: border 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.btn-full {
    width: 100%;
    text-align: center;
    margin-bottom: 1.5rem;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.auth-links {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Like Button */
.like-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
    margin-left: auto; /* Push to right if in flex container */
}

.like-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Bookmark Button */
.bookmark-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
    margin-left: 0.5rem;
}

.bookmark-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.bookmark-btn.bookmarked {
    background: rgba(250, 204, 21, 0.1);
    border-color: #facc15;
    color: #facc15;
}

/* Related Posts */
.related-posts {
    margin: 3rem 0;
}

.related-posts h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.related-post-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.2s;
}

.related-post-card:hover {
    transform: translateY(-5px);
}

.related-post-card a {
    text-decoration: none;
    color: var(--text);
}

.rp-image {
    width: 100%;
    aspect-ratio: 16/9;
}

.rp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-card h4 {
    padding: 1rem;
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
}

/* Nested Comments */
.comment-replies {
    margin-left: 3rem;
    margin-top: 1.5rem;
    border-left: 2px solid var(--border);
    padding-left: 1.5rem;
}

.comment.reply {
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.comment-footer {
    margin-top: 1rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

#reply-to-status {
    background: rgba(59, 130, 246, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Move Form Styling */
.comment .comment-form {
    background: var(--surface);
    border: 1px solid var(--border);
    margin: 1rem 0;
    padding: 1.5rem;
    border-radius: 0.8rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer Enhancements */
footer {
    background: #111111;
    color: #ffffff;
    padding: 5rem 0 2rem;
    margin-top: 5rem;
    font-family: 'Inter', system-ui, sans-serif;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.footer-column h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column ul li a {
    color: #b3b3b3;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-column ul li a:hover {
    color: var(--primary);
}

/* Subscribe Form Styling */
.footer-column-wide {
    grid-column: span 2;
}

.footer-subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row-multi {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.footer-subscribe-form input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 0.5rem;
    color: #ffffff;
    font-family: inherit;
    transition: border-color 0.2s;
}

.footer-subscribe-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.footer-subscribe-form .btn-full {
    padding: 0.9rem;
    font-weight: 600;
}

.footer-divider {
    border-top: 1px solid #333333;
    margin-bottom: 2rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.social-icon {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.2rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.social-icon:hover {
    opacity: 1;
}

.footer-apps {
    display: flex;
    gap: 1rem;
}

.app-store-btn {
    background: #000000;
    border-radius: 4px;
    padding: 0.4rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid #333333;
    min-width: 135px;
    cursor: pointer;
    transition: background 0.2s;
}

.app-store-btn:hover {
    background: #1a1a1a;
}

.app-store-btn span {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #b3b3b3;
}

.app-store-btn strong {
    font-size: 1rem;
    line-height: 1.1;
}


.legal-section {
    margin-top: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #333333;
    padding-top: 2rem;
    color: #888888;
    font-size: 0.85rem;
}

.legal-links {
    display: flex;
    gap: 1.5rem;
}

.legal-links a {
    color: #888888;
    text-decoration: none;
}

.legal-links a:hover {
    color: #ffffff;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Author Card Sidebar (Updated to match image) */
.author-card-sidebar {
    overflow: hidden;
    padding: 1.5rem !important;
}

.author-card-content {
    text-align: center;
}

.author-avatar-box img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    background: var(--surface);
    object-fit: cover;
    margin: 0 auto 1.5rem;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.author-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.author-bio-mini {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.author-followers-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.follow-btn {
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.2s;
}

.follow-btn.following {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid var(--border);
}

.follow-btn.following:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: #ef4444;
}

