/* --- Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    color: #1E1E1E;
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* --- Animated Background --- */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(-45deg, #6C5DD3, #4AB3F4, #8A2BE2, #00BFFF, #DA70D6);
    background-size: 600% 600%;
    animation: gradientBG 15s ease infinite;
    opacity: 0.05;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* --- Header --- */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    color: #1E1E1E;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(108, 93, 211, 0.1);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2) 1;
}

header .logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2);
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    cursor: pointer;
    transition: transform 0.3s;
}

header .logo:hover {
    transform: scale(1.05);
}

header nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

header nav a {
    margin-left: 1.5rem;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    cursor: pointer;
}

header nav a:hover {
    color: #6C5DD3;
    transform: translateY(-2px);
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2);
    transition: width 0.3s;
}

header nav a:hover::after {
    width: 100%;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box {
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    border-radius: 25px;
    background: rgba(108, 93, 211, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    width: 200px;
}

.search-box:focus {
    outline: none;
    border: 2px solid #6C5DD3;
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
}

/* --- Hero Section --- */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    color: #1E1E1E;
    padding: 4rem 2rem;
    text-align: center;
    margin: 2rem;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(108, 93, 211, 0.2);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(108, 93, 211, 0.05), rgba(74, 179, 244, 0.05), rgba(138, 43, 226, 0.05));
    z-index: -1;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2);
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    color: #333;
    font-weight: 300;
}

/* --- Featured Carousel --- */
.carousel {
    position: relative;
    margin: 3rem auto;
    overflow: hidden;
    border-radius: 25px;
    max-width: 1200px;
    box-shadow: 0 15px 50px rgba(108, 93, 211, 0.3);
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    color: #fff;
}

.carousel-slide img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    filter: brightness(60%);
}

.carousel-slide .carousel-content {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    padding: 2rem;
    border-radius: 20px;
}

.carousel-slide h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-slide p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.carousel-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* --- Category Tabs --- */
.categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    flex-wrap: wrap;
    padding: 0 2rem;
}

.categories button {
    background: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2);
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(108, 93, 211, 0.3);
}

.categories button:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 10px 25px rgba(108, 93, 211, 0.4);
}

.categories button.active {
    background: #1E1E1E;
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* --- Main Content --- */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.feed {
    flex: 2.5;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    padding: 2rem;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(108, 93, 211, 0.15);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(108, 93, 211, 0.1), transparent);
    transition: left 0.5s;
}

.post-card:hover::before {
    left: 100%;
}

.post-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(108, 93, 211, 0.25);
    border: 2px solid #6C5DD3;
}

.post-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #1E1E1E;
    transition: color 0.3s;
}

.post-card:hover h2 {
    background: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2);
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.post-card p {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.post-card .meta {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(108, 93, 211, 0.1);
}

.read-time {
    background: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2);
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 600;
}

/* --- Sidebar --- */
.sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 120px;
    height: fit-content;
}

.sidebar h3 {
    font-family: 'Playfair Display', serif;
    color: #1E1E1E;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.sidebar .widget {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(108, 93, 211, 0.15);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.sidebar .widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(108, 93, 211, 0.2);
    border: 2px solid rgba(108, 93, 211, 0.3);
}

.sidebar .trending-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(108, 93, 211, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.sidebar .trending-item:last-child {
    border: none;
    margin-bottom: 0;
}

.sidebar .trending-item:hover {
    color: #6C5DD3;
    transform: translateX(10px);
    background: rgba(108, 93, 211, 0.05);
    padding-left: 1rem;
}

.newsletter {
    background: linear-gradient(135deg, rgba(108, 93, 211, 0.1), rgba(74, 179, 244, 0.1));
    text-align: center;
}

.newsletter input {
    width: 100%;
    padding: 1rem;
    border: 2px solid transparent;
    border-radius: 25px;
    margin: 1rem 0;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
}

.newsletter input:focus {
    outline: none;
    border: 2px solid #6C5DD3;
    background: white;
}

.newsletter button {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 25px;
    background: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2);
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.newsletter button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(108, 93, 211, 0.3);
}

/* --- Profile Section --- */
.profile-section {
    display: none;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.profile-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: 0 10px 40px rgba(108, 93, 211, 0.2);
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(108, 93, 211, 0.05), rgba(74, 179, 244, 0.05));
    z-index: -1;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #6C5DD3, #4AB3F4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    box-shadow: 0 10px 30px rgba(108, 93, 211, 0.3);
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

.profile-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(108, 93, 211, 0.4);
}

.profile-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    background: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2);
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.profile-title {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 1rem;
}

.profile-bio {
    font-size: 1.1rem;
    color: #333;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2);
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.profile-tabs {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(108, 93, 211, 0.15);
}

.tab-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 25px;
    background: rgba(108, 93, 211, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    color: #6C5DD3;
}

.tab-btn.active {
    background: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2);
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
    color: white;
    border: 2px solid transparent;
}

.tab-btn:hover:not(.active) {
    background: rgba(108, 93, 211, 0.2);
    transform: translateY(-2px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-widget {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(108, 93, 211, 0.15);
    transition: all 0.3s;
}

.profile-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(108, 93, 211, 0.2);
}

.profile-widget h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
    color: #1E1E1E;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(108, 93, 211, 0.1);
}

.achievement-item:last-child {
    border-bottom: none;
}

.achievement-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6C5DD3, #4AB3F4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 15px;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.social-link:hover {
    background: rgba(108, 93, 211, 0.1);
    border: 2px solid rgba(108, 93, 211, 0.2);
    transform: translateX(10px);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 1rem;
    border: 2px solid rgba(108, 93, 211, 0.2);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border: 2px solid #6C5DD3;
    background: white;
    transform: scale(1.02);
}

.save-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    background: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2);
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    align-self: flex-start;
}

.save-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(108, 93, 211, 0.3);
}

/* --- Floating Action Button --- */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2);
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
    color: #fff;
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(108, 93, 211, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 100;
    border: none;
}

.fab:hover {
    transform: scale(1.1) rotate(45deg);
    box-shadow: 0 15px 40px rgba(108, 93, 211, 0.5);
}

/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 3rem;
    border-radius: 25px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(108, 93, 211, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-content h2 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2);
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 2rem;
}

.modal input,
.modal textarea,
.modal select {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(108, 93, 211, 0.2);
    border-radius: 15px;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    transition: all 0.3s;
}

.modal input:focus,
.modal textarea:focus,
.modal select:focus {
    outline: none;
    border: 2px solid #6C5DD3;
    background: white;
    transform: scale(1.02);
}

.modal button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    background: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2);
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 1rem;
}

.modal button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(108, 93, 211, 0.3);
}

.modal .cancel-btn {
    background: #6c757d;
    animation: none;
}

/* --- Footer --- */
footer {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(15px);
    color: #F5F5F5;
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, #6C5DD3, #4AB3F4, #8A2BE2) 1;
}

footer a {
    color: #4AB3F4;
    margin: 0 1rem;
    transition: all 0.3s;
}

footer a:hover {
    color: #6C5DD3;
    transform: translateY(-2px);
}

.social-links {
    margin-top: 2rem;
}

.social-links a {
    display: inline-block;
    margin: 0 1rem;
    font-size: 1.5rem;
    transition: all 0.3s;
}

.social-links a:hover {
    transform: scale(1.2) rotate(5deg);
}

/* --- Responsive Design --- */
@media(max-width:768px) {
    .hero {
        margin: 1rem;
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .categories {
        padding: 0 1rem;
    }

    .categories button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .container {
        padding: 0 1rem;
    }

    .post-card {
        padding: 1.5rem;
    }

    .carousel-slide .carousel-content {
        padding: 1rem;
        bottom: 15px;
        left: 15px;
        right: 15px;
    }

    .fab {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .profile-section {
        padding: 0 1rem;
    }

    .profile-header {
        padding: 2rem 1rem;
    }

    .profile-stats {
        gap: 1.5rem;
    }

    .tab-buttons {
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

.hero-logo {
    width: 120px;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #6C5DD3, #4AB3F4, #8A2BE2);
    padding: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.dropdown-menu {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dropdown-menu.show {
    opacity: 1;
}

@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        position: static;
    }

    .carousel-slide img {
        height: 300px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    header {
        padding: 1rem;
    }

    header .logo {
        font-size: 1.5rem;
    }

    header nav {
        display: none;
    }

    .search-box {
        width: 150px;
    }

    .profile-content {
        grid-template-columns: 1fr;
    }

    .profile-stats {
        gap: 2rem;
    }

    .tab-buttons {
        justify-content: center;
    }
}