:root {
    /* Premium Light Theme Palette */
    --bg-primary: #f5f7fa;
    --bg-card: rgba(255, 255, 255, 0.85);
    --text-primary: #2c3e50;
    --text-secondary: #596e79;
    --accent-color: #3498db;
    --accent-hover: #2980b9;
    --border-color: #e0e0e0;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

body {
    background-color: #f8faff;
    background-image:
        radial-gradient(at 0% 0%, hsla(203, 76%, 85%, 1) 0px, transparent 50%),
        radial-gradient(at 50% 0%, hsla(273, 50%, 90%, 1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, hsla(190, 70%, 85%, 1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, hsla(203, 76%, 90%, 1) 0px, transparent 50%),
        radial-gradient(at 50% 100%, hsla(273, 50%, 95%, 1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, hsla(190, 70%, 90%, 1) 0px, transparent 50%);
    background-attachment: fixed;
    background-size: 200% 200%;
    animation: meshBackground 20s ease infinite;
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
}

@keyframes meshBackground {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-color), #8e44ad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s ease;
}

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

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

.glass-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.btn-icon-delete {
    color: #e74c3c;
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.btn-icon-delete:hover {
    transform: scale(1.2);
}

.post-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.post-actions {
    margin-top: 1rem;
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-icon-edit {
    color: var(--accent-color);
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.btn-icon-edit:hover {
    transform: scale(1.2);
}

/* Filter Bar */
.filter-bar {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 16px;
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input,
.date-picker input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    font-family: inherit;
}

.search-box input {
    padding-left: 2.8rem;
}

.filter-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
}

.btn-filter {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-clear {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: underline;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-item-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.category-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-edit-small {
    color: var(--accent-color);
}

.btn-delete-small {
    color: #e74c3c;
}

/* Misc */
.home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.btn-secondary-small {
    background: rgba(149, 165, 166, 0.1);
    color: #7f8c8d;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid #bdc3c7;
}

/* Auth Containers */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-card h2 {
    font-family: var(--font-heading);
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Base & Typography Improvements */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #d6e0f0 100%);
    background-attachment: fixed;
    background-size: cover;
}

.container {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar Buttons */
.btn-nav {
    background: var(--accent-color);
    color: white !important;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s;
}

.btn-logout:hover {
    color: #e74c3c;
}

/* CRUD Buttons */
.admin-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-edit,
.btn-delete {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-edit {
    background: rgba(52, 152, 219, 0.1);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn-edit:hover {
    background: var(--accent-color);
    color: white;
}

.btn-delete {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.btn-delete:hover {
    background: #e74c3c;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

/* Form Styles */
.form-container {
    max-width: 900px;
    margin: 3rem auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
}

.premium-form select,
.premium-form input[type="text"],
.premium-form input[type="file"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.django-ckeditor-5-wrapper {
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-published {
    background: #d4edda;
    color: #155724;
}

.status-draft {
    background: #fff3cd;
    color: #856404;
}

/* Confirm Delete Card */
.video-container {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.entry-video {
    width: 100%;
    display: block;
}

.confirm-delete-card {
    max-width: 500px;
    margin: 10vh auto;
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-card);
}

.warning-text {
    color: #e74c3c;
    font-weight: 600;
    margin: 1.5rem 0;
}

.post-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

.post-image {
    height: 200px;
    overflow: hidden;
}

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

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

.post-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-content h3 {
    font-family: var(--font-heading);
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.read-more {
    margin-top: auto;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Entry Detail */
.entry-detail {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    margin: 3rem auto;
    max-width: 800px;
}

.entry-header {
    text-align: center;
    margin-bottom: 2rem;
}

.entry-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.entry-date {
    color: var(--text-secondary);
}

.entry-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-soft);
}

.entry-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.entry-body h2,
.entry-body h3 {
    font-family: var(--font-heading);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.back-link:hover {
    color: var(--accent-color);
}

/* Footer */
.main-footer {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4rem 0 2rem;
    margin-top: 5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 300px;
    font-size: 0.95rem;
}

.footer-links h4, .footer-social h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.3s;
}

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

.social-icons {
    display: flex;
    gap: 1.2rem;
}

.social-icons a {
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-copyright {
    grid-column: 1 / -1;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 2.5rem;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    .footer-brand p {
        margin: 1rem auto;
    }
    .social-icons {
        justify-content: center;
    }
}
