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

body {
    background: #0E0F1D;
    color: white;
    font-family: 'Comfortaa', sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-theme {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eaf0 50%, #d4d8e8 100%);
    color: #1a1a2e;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

.main-content {
    position: relative;
    z-index: 5;
    background: transparent;
}

.hero-section {
    text-align: center;
    padding: 60px 40px 10px;
    margin-bottom: 20px;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: white;
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    background-clip: initial;
    transition: color 0.3s ease;
}

body.light-theme .hero-section h1 {
    color: #1a1a2e;
}

.hero-section p {
    font-size: 1.2rem;
    color: #ccc;
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
    transition: color 0.3s ease;
}

body.light-theme .hero-section p {
    color: #6b6b7f;
}

.search-bar {
    max-width: 500px;
    margin: 0 auto 3px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #5638E5;
    border-radius: 25px;
    background: rgba(14, 15, 29, 0.95);
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

body.light-theme .search-bar input {
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    border-color: #7c5cef;
}

.search-bar input:focus {
    border-color: #8b73ff;
}

.search-bar button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(45deg, #5638E5, #8b73ff);
    border: none;
    border-radius: 20px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3;
}

.search-bar button i.fas {
    color: #ffffff !important;
    font-size: 15px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.search-bar button:hover {
    background: linear-gradient(45deg, #8b73ff, #5638E5);
    transform: translateY(-50%) scale(1.05);
}

.search-bar button:hover i.fas {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

.category-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 3px 40px 30px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 20px;
    border: 2px solid #4430A7;
    border-radius: 25px;
    background: rgba(14, 15, 29, 0.8);
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

body.light-theme .category-btn {
    background: rgba(255, 255, 255, 0.8);
    color: #6b6b7f;
    border-color: #7c5cef;
}

.category-btn:hover,
.category-btn.active {
    background: linear-gradient(45deg, #5638E5, #8b73ff);
    border-color: transparent;
    color: white;
}

.featured-section {
    padding: 20px 40px 30px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: center;
    color: #ffffff;
    transition: color 0.3s ease;
}

body.light-theme .section-title {
    color: #1a1a2e;
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.featured-main {
    background: linear-gradient(135deg, rgba(14, 15, 29, 0.9), rgba(68, 48, 167, 0.2));
    border: 1px solid #5638E5;
    border-radius: 15px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
}

body.light-theme .featured-main {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(124, 92, 239, 0.1));
    border-color: #7c5cef;
}

.featured-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #0E0F1D;
    opacity: 0.95;
    z-index: -1;
    transition: opacity 0.3s ease;
}

body.light-theme .featured-main::before {
    background: #ffffff;
}

.featured-main::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(86, 56, 229, 0.1),
            transparent);
    transition: left 0.7s ease;
    z-index: 0;
}

.featured-main:hover {
    border-color: #8b73ff;
    box-shadow: 0 15px 30px rgba(86, 56, 229, 0.3);
}

.featured-main:hover::after {
    left: 100%;
}

.featured-main:hover::before {
    opacity: 0.98;
}

.featured-main h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

body.light-theme .featured-main h2 {
    color: #1a1a2e;
}

.featured-main p {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

body.light-theme .featured-main p {
    color: #6b6b7f;
}

.featured-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-post {
    background: linear-gradient(135deg, rgba(14, 15, 29, 0.9), rgba(68, 48, 167, 0.2));
    border: 1px solid #4430A7;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

body.light-theme .sidebar-post {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(124, 92, 239, 0.1));
    border-color: #7c5cef;
}

.sidebar-post::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #0E0F1D;
    opacity: 0.9;
    z-index: -1;
    transition: opacity 0.3s ease;
}

body.light-theme .sidebar-post::before {
    background: #ffffff;
}

.sidebar-post::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(86, 56, 229, 0.1),
            transparent);
    transition: left 0.7s ease;
    z-index: 0;
}

.sidebar-post:hover {
    border-color: #5638E5;
    box-shadow: 0 10px 25px rgba(86, 56, 229, 0.25);
}

.sidebar-post:hover::after {
    left: 100%;
}

.sidebar-post:hover::before {
    opacity: 0.95;
}

.sidebar-post h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    line-height: 1.3;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

body.light-theme .sidebar-post h3 {
    color: #1a1a2e;
}

.sidebar-post p {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 15px;
    line-height: 1.4;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

body.light-theme .sidebar-post p {
    color: #6b6b7f;
}

.sidebar-post .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    position: relative;
    z-index: 2;
}

.sidebar-post .card-meta {
    display: flex;
    align-items: flex-end;
}

.sidebar-post .post-date {
    font-size: 0.8rem;
    color: #ffffff;
    transition: color 0.3s ease;
}

body.light-theme .sidebar-post .post-date {
    color: #1a1a2e;
}

.sidebar-post .read-more {
    color: #8b73ff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-post .read-more:hover {
    color: #5638E5;
}

.sidebar-post .read-more::after {
    content: '→';
    margin-left: 5px;
    transition: margin-left 0.3s ease;
}

.sidebar-post .read-more:hover::after {
    margin-left: 8px;
}

.recent-section {
    padding: 0 40px 40px;
}

.recent-section .section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: center;
    color: #ffffff;
    transition: color 0.3s ease;
}

body.light-theme .recent-section .section-title {
    color: #1a1a2e;
}

.recent-section .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.blog-card {
    background: linear-gradient(135deg, rgba(14, 15, 29, 0.9), rgba(68, 48, 167, 0.1));
    border: 1px solid #4430A7;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    cursor: pointer;
}

body.light-theme .blog-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(124, 92, 239, 0.1));
    border-color: #7c5cef;
}

.blog-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #0E0F1D;
    opacity: 0.95;
    z-index: -1;
    transition: opacity 0.3s ease;
}

body.light-theme .blog-card::before {
    background: #ffffff;
}

.blog-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(86, 56, 229, 0.1),
            transparent);
    transition: left 0.7s ease;
    z-index: 0;
}

.blog-card:hover {
    border-color: #5638E5;
    box-shadow: 0 12px 25px rgba(86, 56, 229, 0.25);
}

.blog-card:hover::after {
    left: 100%;
}

.blog-card:hover::before {
    opacity: 0.98;
}

.blog-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: white;
    line-height: 1.4;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

body.light-theme .blog-card h3 {
    color: #1a1a2e;
}

.blog-card p {
    font-size: 0.95rem;
    color: #bbb;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

body.light-theme .blog-card p {
    color: #6b6b7f;
}

.tags {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.tag {
    background: linear-gradient(45deg, rgba(86, 56, 229, 0.3), rgba(139, 115, 255, 0.2));
    color: #8b73ff;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 15px;
    border: 1px solid rgba(139, 115, 255, 0.3);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    position: relative;
    z-index: 2;
}

.card-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.read-more {
    color: #8b73ff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.read-more:hover {
    color: #5638E5;
}

.read-more::after {
    content: '→';
    margin-left: 8px;
    transition: margin-left 0.3s ease;
}

.read-more:hover::after {
    margin-left: 12px;
}

.post-date {
    font-size: 0.85rem;
    color: white;
    transition: color 0.3s ease;
}

body.light-theme .post-date {
    color: #1a1a2e;
}

.author {
    font-size: 0.8rem;
    color: white;
    font-style: normal;
    transition: color 0.3s ease;
}

body.light-theme .author {
    color: #1a1a2e;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px 40px 30px;
    margin-bottom: 10px;
}

.pagination button {
    padding: 10px 15px;
    border: 2px solid #4430A7;
    border-radius: 8px;
    background: rgba(14, 15, 29, 0.8);
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.light-theme .pagination button {
    background: rgba(255, 255, 255, 0.8);
    color: #6b6b7f;
    border-color: #7c5cef;
}

.pagination button:hover,
.pagination button.active {
    background: linear-gradient(45deg, #5638E5, #8b73ff);
    border-color: transparent;
    color: white;
}

footer {
    background-color: rgba(10, 13, 24, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid #2C2F45;
    padding: 60px 50px 40px;
    font-family: 'Comfortaa', sans-serif;
    color: white;
    position: relative;
    z-index: 10;
    margin-top: 40px;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

body.light-theme footer {
    background-color: rgba(255, 255, 255, 0.9);
    border-top-color: #d4d8e8;
    color: #1a1a2e;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.footer-section {
    margin-bottom: 20px;
    flex: 1;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #6f54f8;
    transition: color 0.3s ease;
}

body.light-theme .footer-section h3 {
    color: #5638E5;
}

.footer-links a {
    display: block;
    margin-bottom: 12px;
    padding: 2px 0;
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    width: fit-content;
}

body.light-theme .footer-links a {
    color: #1a1a2e;
}

.footer-links a:hover {
    color: #5638E5;
    text-decoration: none;
}

.footer-separator {
    width: 100%;
    height: 1px;
    background-color: #1A1F36;
    margin: 20px 0;
    transition: background-color 0.3s ease;
}

body.light-theme .footer-separator {
    background-color: #d4d8e8;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    font-size: 14px;
    color: #888;
    transition: color 0.3s ease;
}

body.light-theme .copyright {
    color: #6b6b7f;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: rgba(10, 13, 24, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #5638E5;
    position: relative;
    z-index: 10;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.light-theme .navbar {
    background-color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid #7c5cef;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    width: 45px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    gap: 20px;
    font-family: 'PT Sans', sans-serif;
    font-size: 16px;
}

.nav-links a {
    text-decoration: none;
    color: white;
    transition: color 0.3s ease;
}

body.light-theme .nav-links a {
    color: #1a1a2e;
}

.nav-links a:hover {
    color: #543fce;
}

body.light-theme .nav-links a:hover {
    color: #5638E5;
}

.nav-links a.active {
    color: #543fce;
    font-weight: bold;
}

body.light-theme .nav-links a.active {
    color: #5638E5;
}

.signup-hamburger {
    display: flex;
    align-items: center;
    gap: 30px;
}

.signup-btn {
    background-color: #0E0634;
    border: 2px solid #5638E5;
    border-radius: 7px;
    padding: 10px 20px;
    font-family: 'PT Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

body.light-theme .signup-btn {
    background-color: #5638E5;
    border-color: #4325c2;
    color: white;
}

.signup-btn:hover {
    background-color: #5638E5;
}

body.light-theme .signup-btn:hover {
    background-color: #4325c2;
}

.hamburger {
    width: 25px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.hamburger div {
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

body.light-theme .hamburger div {
    background-color: #1a1a2e;
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }

    .nav-links {
        display: none;
    }

    .hero-section {
        padding: 40px 20px 15px;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section p {
        margin: 0 auto 25px;
    }

    .search-bar {
        margin: 0 auto 2px;
    }

    .category-filter {
        padding: 2px 20px 30px;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .featured-section,
    .recent-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .blog-card {
        min-height: 280px;
    }

    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .card-meta {
        align-items: flex-start;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .sidebar-post {
        padding: 20px;
    }

    .sidebar-post h3 {
        margin-bottom: 10px;
    }

    .sidebar-post p {
        margin-bottom: 12px;
    }
}