/* CSS Variables & Theme */
:root {
    --bg-dark: #0B0F1A;
    --surface: #131929;
    --surface-raised: #1A2235;
    --border: rgba(255,255,255,0.08);
    --text: #F1F5F9;
    --text-muted: #8899B4;
    --text-dim: #4E6080;
    --grad-start: #6A11CB;
    --grad-end: #2575FC;
    --cyan: #00D2FF;
    --purple-light: #A78BFA;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    line-height: 1.5;
}

/* Glass Navigation */
.glass-nav {
    background: rgba(11, 15, 26, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.brand-accent {
    color: var(--purple-light);
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text) !important;
    background-color: var(--surface-raised);
}

.navbar-toggler {
    color: var(--text);
    background: transparent;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Gradient Button */
.btn-grad-primary {
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: 100px;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(106, 17, 203, 0.4);
}

.btn-grad-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.5);
}

.btn-grad-primary.btn-lg {
    padding: 0.9rem 2rem;
    font-size: 1rem;
}

/* Hero Section */
.hero-section {
    padding: 4rem 0 2rem;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle at 30% 50%, rgba(106, 17, 203, 0.12), transparent 70%);
    pointer-events: none;
}

.featured-badge {
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
}

.text-date {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-text {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 90%;
}

.author-avatar {
    border: 2px solid rgba(106, 17, 203, 0.5);
    width: 48px;
    height: 48px;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.hero-image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 0 1px rgba(106, 17, 203, 0.3);
}

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

.hero-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11,15,26,0.8), transparent 55%);
    pointer-events: none;
}

.hero-image-badge {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
}

.gradient-badge-sm {
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
}

/* Gradient Divider */
.gradient-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(106, 17, 203, 0.5), transparent);
    margin: 0;
}

/* Categories Section */
.categories-section {
    padding: 1.75rem 0;
}

.category-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.category-pill {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.category-pill.active {
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(106, 17, 203, 0.35);
}

.category-pill:hover:not(.active) {
    background: var(--surface);
    color: var(--text);
}

/* Blog Card */
.blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    border-color: rgba(106, 17, 203, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(106, 17, 203, 0.15);
}

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

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.blog-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11,15,26,0.7), transparent 50%);
}

.blog-card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.blog-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.2s;
}

.blog-card:hover .blog-card-title {
    color: var(--purple-light);
}

.blog-card-excerpt {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.blog-author-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.blog-author-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
}

.blog-meta {
    color: var(--text-dim);
    font-size: 0.7rem;
}

/* Load More Button */
.btn-load-more {
    background: transparent;
    border: 2px solid rgba(106, 17, 203, 0.5);
    color: var(--purple-light);
    padding: 0.75rem 2rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-load-more:hover {
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 20px rgba(106, 17, 203, 0.4);
}

/* Sidebar */
.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.9rem;
}

.search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--grad-start);
}

.search-input::placeholder {
    color: var(--text-dim);
}

/* Popular Posts */
.popular-item {
    display: flex;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: opacity 0.2s;
}

.popular-item:hover {
    opacity: 0.8;
}

.popular-rank {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    border-radius: 50%;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -6px;
    left: -6px;
}

.popular-img-wrapper {
    position: relative;
    flex-shrink: 0;
}

.popular-img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.popular-title {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.popular-date {
    color: var(--text-dim);
    font-size: 0.7rem;
}

/* Newsletter Card */
.newsletter-card {
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.newsletter-card::before {
    content: '';
    position: absolute;
    top: -2rem;
    right: -2rem;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.newsletter-input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    color: white;
    font-size: 0.85rem;
    outline: none;
}

.newsletter-input::placeholder {
    color: rgba(255,255,255,0.6);
}

.btn-newsletter-subscribe {
    background: white;
    border: none;
    padding: 0.7rem;
    border-radius: 12px;
    color: var(--grad-start);
    font-weight: 700;
    font-size: 0.85rem;
    transition: transform 0.2s;
}

.btn-newsletter-subscribe:hover {
    transform: translateY(-2px);
}

/* Tags Cloud */
.text-cyan {
    color: var(--cyan);
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.4rem 0.9rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-item:hover {
    border-color: var(--grad-start);
    color: var(--text);
}

/* Social Buttons */
.social-btn {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    padding: 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
    color: var(--text-muted);
}

.social-btn[data-social="twitter"]:hover { background: #1DA1F2; color: white; border-color: #1DA1F2; }
.social-btn[data-social="discord"]:hover { background: #5865F2; color: white; border-color: #5865F2; }
.social-btn[data-social="telegram"]:hover { background: #0088CC; color: white; border-color: #0088CC; }
.social-btn[data-social="youtube"]:hover { background: #FF0000; color: white; border-color: #FF0000; }

/* Newsletter Banner */
.newsletter-banner {
    background: linear-gradient(135deg, rgba(106,17,203,0.95), rgba(37,117,252,0.95));
    padding: 4rem 0;
    margin: 2rem 0 0;
    position: relative;
    overflow: hidden;
}

.newsletter-banner::before {
    content: '';
    position: absolute;
    top: -4rem;
    right: -4rem;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.banner-badge {
    background: rgba(255,255,255,0.15);
    padding: 0.25rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.banner-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    color: white;
}

.banner-text {
    color: rgba(255,255,255,0.75);
}

.banner-input {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 0.9rem 1.25rem;
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
    outline: none;
}

.banner-input::placeholder {
    color: rgba(255,255,255,0.6);
}

.btn-banner-subscribe {
    background: white;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 12px;
    color: var(--grad-start);
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: transform 0.2s;
}

.btn-banner-subscribe:hover {
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: #07090F;
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    margin-top: 0;
}

.footer-text {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.5;
}

.footer-social {
    width: 36px;
    height: 36px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    transition: all 0.2s;
}

.footer-social:hover {
    background: var(--grad-start);
    color: white;
    border-color: transparent;
}

.footer-heading {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.footer-links a i {
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.2s;
}

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

.footer-links a:hover i {
    opacity: 1;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.contact-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    opacity: 0.5;
    margin-bottom: 0.2rem;
}

.topic-tag {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.topic-tag:hover {
    border-color: var(--grad-start);
    color: var(--text);
}

.footer-divider {
    border-color: var(--border);
    margin: 2rem 0;
}

.copyright {
    color: var(--text-dim);
    font-size: 0.7rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.7rem;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: var(--text);
}

/* Toast Notification */
.custom-toast {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-text {
        max-width: 100%;
    }
    
    .newsletter-banner {
        padding: 3rem 0;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0 1rem;
    }
    
    .hero-section::before {
        width: 300px;
        height: 300px;
    }
    
    .btn-grad-primary.btn-lg {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeIn 0.5s ease forwards;
}