:root {
    /* Background colors - Deep Space Dark */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;

    /* Text colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    /* Gradients - Elegant & Smooth */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-hover: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    --gradient-border: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(168, 85, 247, 0.5));
    --gradient-text: linear-gradient(to right, #818cf8, #c084fc, #f472b6);

    /* Solid Accents */
    --accent: #8b5cf6;

    /* Borders */
    --border: rgba(255, 255, 255, 0.1);

    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.15);
    --shadow-glow-hover: 0 0 30px rgba(139, 92, 246, 0.3);

    /* Semantic colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Background Animation - Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: blob-bounce 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #4f46e5;
    animation-duration: 25s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: #9333ea;
    animation-duration: 30s;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 400px;
    height: 400px;
    background: #db2777;
    opacity: 0.2;
    animation-duration: 20s;
    animation-delay: -10s;
}

@keyframes blob-bounce {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* Header */
header {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: var(--shadow-glow);
}

.logo-icon i {
    color: white;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Login Button */
.btn-login {
    background: var(--gradient-primary) !important;
    color: white !important;
    padding: 0.6rem 1.4rem !important;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-glow);
}

.btn-login:hover {
    background: var(--gradient-hover) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow-hover);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 8rem 0 6rem;
    max-width: 900px;
    margin: 0 auto;
    animation: fadeIn 0.8s ease-out;
    position: relative;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    color: #a78bfa;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    backdrop-filter: blur(5px);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.3));
}

.hero p {
    font-size: 1.35rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.7;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* Section Headers */
section {
    padding: 5rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-all-link {
    color: #a78bfa;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.view-all-link:hover {
    gap: 0.75rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Cards (Clean & Sharp) */
.tool-card,
.blog-card,
.login-container,
.posts-list,
.glass-form {
    position: relative;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 20px;
    padding: 2px;
    background-clip: padding-box;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Gradient Border on Hover ONLY */
.tool-card::before,
.blog-card::before,
.login-container::before,
.posts-list::before,
.glass-form::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: var(--gradient-border);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover::before,
.blog-card:hover::before {
    opacity: 1;
}

/* Specific Card Styles */
.tool-card {
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    text-decoration: none;
    color: inherit;
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.4), var(--shadow-glow-hover);
    background: rgba(30, 41, 59, 0.8);
}

.tool-icon {
    width: 65px;
    height: 65px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #818cf8;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tool-card:hover .tool-icon {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.1) rotate(-5deg);
    box-shadow: var(--shadow-glow);
    border-color: transparent;
}

.tool-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Blog Grid */
.blog-grid,
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.blog-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.4), var(--shadow-glow-hover);
    border-color: transparent;
}

.blog-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: var(--bg-secondary);
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 2rem;
    background: transparent;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.blog-card-category {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.15);
    color: #a78bfa;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    width: fit-content;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.blog-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.3s;
}

.blog-card:hover .blog-card-title {
    color: #c084fc;
}

.blog-card-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Forms - Clean & Glassy */
.login-container,
.glass-form,
.posts-list {
    padding: 3rem;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
}

.form-group label {
    color: var(--text-secondary);
    font-weight: 600;
}

.form-input,
textarea,
input[type="text"],
input[type="email"],
input[type="password"] {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.9rem;
    width: 100%;
    transition: all 0.3s;
}

.form-input:focus,
textarea:focus,
input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
    background: rgba(15, 23, 42, 0.9);
}

/* Search Bar Specific */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.search-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    padding-left: 3.5rem;
    border-radius: 100px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border);
    color: white;
    font-size: 1.1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.25);
    background: rgba(30, 41, 59, 0.9);
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1rem;
}

.btn:hover {
    background: var(--gradient-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-hover);
}

/* Footer */
footer {
    margin-top: auto;
    padding: 5rem 2rem;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Visitor Counter */
.visitor-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.visitor-count:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: var(--accent);
}

.visitor-count i {
    color: var(--accent);
}

/* Typography Refinement */
h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.02em;
}

p {
    letter-spacing: 0.01em;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }

    .hero {
        padding: 5rem 0 4rem;
    }

    .tools-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .container {
        padding: 0 1.5rem;
    }

    .blob {
        filter: blur(60px);
        opacity: 0.3;
    }
}