:root {
    --bg-color: #0b1120;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #1d4ed8;
    --card-bg: rgba(30, 41, 59, 0.4);
    --card-border: rgba(255, 255, 255, 0.08);
    --navbar-bg: rgba(11, 17, 32, 0.7);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0, transparent 50%),
        radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.1) 0, transparent 50%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism utilities */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-main);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navbar-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-main);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Main Layout */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 3rem 2rem;
}

/* Forms */
.form-container {
    max-width: 450px;
    margin: 2rem auto;
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background-color: rgba(15, 23, 42, 0.5);
    color: var(--text-main);
    font-family: inherit;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Cards (Posts) */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.post-card {
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.post-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}

.post-excerpt {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Alerts / Messages */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-content {
        padding: 2rem 1rem;
    }
}

/* --- Added from Demo Blog UI --- */

/* Unique Cinematic Tech Background for Blog */
.blog-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    /* High-quality abstract, elegant dark background */
    background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7)), 
                url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.blog-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Adding a subtle cyan and purple aura glow overlay */
    background: 
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
}

.blog-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    padding: 3rem 0;
    text-align: center;
    position: relative;
    z-index: 10;
}

.blog-title {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.app-navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-navbar .brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
}

/* Advanced Card UI from demo */
.blog-post-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 2.5rem;
    border-radius: 16px;
    overflow: hidden;
    color: #f1f5f9;
}

.blog-post-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 20px 40px -10px rgba(56, 189, 248, 0.2);
}

.blog-post-card .card-img-top {
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.5s ease;
}

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

.blog-post-card .card-body {
    position: relative;
    z-index: 2;
    background: linear-gradient(to top, rgba(30, 41, 59, 1) 0%, rgba(30, 41, 59, 0.8) 100%);
    padding: 1.5rem;
}

.blog-post-card .card-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #f8fafc;
}

.blog-post-card .card-title a {
    color: #f8fafc;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-post-card .card-title a:hover {
    color: #38bdf8;
}

/* Sidebar Widgets */
.widget-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.widget-card .card-header {
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    padding: 1rem 1.25rem;
    color: #e2e8f0;
}

.widget-card .card-body {
    padding: 1.25rem;
    color: #94a3b8;
}

.widget-list-group .list-group-item {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    transition: 0.3s;
}

.widget-list-group .list-group-item a {
    color: #94a3b8;
    text-decoration: none;
    transition: 0.3s;
}

.widget-list-group .list-group-item:hover {
    background: rgba(56, 189, 248, 0.05);
    padding-left: 1.5rem;
}

.widget-list-group .list-group-item:hover a {
    color: #38bdf8;
}

/* Glass Form Settings */
.glass-form-container {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    color: #f1f5f9;
}

.glass-form-container input[type="text"],
.glass-form-container input[type="password"],
.glass-form-container input[type="email"],
.glass-form-container textarea {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border-radius: 8px;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.glass-form-container input:focus,
.glass-form-container textarea:focus {
    background: rgba(15, 23, 42, 0.8);
    border-color: #38bdf8;
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.25);
    outline: none;
}

