* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0ea5e9;
    --secondary-color: #22c55e;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    background: var(--light-bg);
    color: var(--text-dark);
}

.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 62px;
    max-height: 72px;
    width: auto;
    border-radius: 8px;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    border-bottom: 2px solid transparent;
    padding-bottom: 0.25rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    opacity: 0.8;
    border-bottom-color: white;
}

.btn-logout {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-logout:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.admin-login-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font: inherit;
    font-weight: 500;
    padding: 0;
}

.admin-login-btn:hover {
    opacity: 0.8;
}

/* Banner Section */
.banner {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    height: clamp(200px, 28vh, 320px);
    max-height: 360px;
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 200px;
}

.categories {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.categories-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.categories-header h2 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.categories-header p {
    color: var(--text-light);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.category-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    max-width: 400px;
    width: 100%;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card h3 {
    margin: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

/* Forum Card Special Styling */
.forum-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.forum-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.forum-card:hover::before {
    opacity: 1;
}

.forum-card .forum-icon {
    font-size: 4rem;
    text-align: center;
    padding: 2rem 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.forum-card h3 {
    color: white;
    margin: 0.5rem 1rem;
    font-weight: 600;
}

.forum-card p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 1rem 1rem;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.4;
}

/* Better Forum Grid Cards */
.forum-layout .category-card {
    background: #1e293b;
    border: 1px solid #334155;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Custom Background for Sports Category Card (Case-insensitive) */
.category-card[href*="category=sports" i] {
    background: linear-gradient(rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.9)), 
                url('images/Sports.webp') center/cover no-repeat !important;
}

/* Custom Background for Entertainment Category Card (Case-insensitive) */
.category-card[href*="category=entertainment" i] {
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9)), 
                url('images/Entertainment.webp') center/cover no-repeat !important;
}

.category-card[href*="category=entertainment" i] .category-icon-wrapper {
    color: #a78bfa !important; /* Vibrant purple to match the entertainment poster theme */
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Custom Background for General Discussion Category Card (Case-insensitive) */
.category-card[href*="category=general" i] {
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9)), 
                url('images/General disussion.webp') center/cover no-repeat !important;
}

.category-card[href*="category=general" i] .category-icon-wrapper {
    color: #0ea5e9 !important; /* Sky blue to match the image icons */
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Custom Background for Technology Category Card (Case-insensitive) */
.category-card[href*="category=tech" i] {
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9)), 
                url('images/Technology.webp') center/cover no-repeat !important;
}

.category-card[href*="category=tech" i] .category-icon-wrapper {
    color: #00e5ff !important; /* Bright cyan to match the tech theme */
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Custom Background for Health & Wellness Category Card (Case-insensitive) */
.category-card[href*="category=health" i] {
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9)), 
                url('images/Health and Wellness.webp') center/cover no-repeat !important;
}

.category-card[href*="category=health" i] .category-icon-wrapper {
    color: #10b981 !important; /* Vibrant green to match the health and wellness theme */
    background: rgba(255, 255, 255, 0.03) !important;
}

.forum-layout .category-card:hover {
    border-color: var(--primary-color);
    background: #243147;
    transform: translateY(-5px);
}

.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.category-icon-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon-wrapper {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 15px var(--primary-color);
}

.category-card h3 {
    color: #f8fafc;
    font-size: 1.15rem;
    margin: 0 0 0.5rem 0;
    text-align: left;
}

.category-stats {
    display: flex;
    gap: 1rem;
    border-top: 1px solid #334155;
    padding-top: 1rem;
    font-size: 12px;
    color: #64748b;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-bar {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
}

.search-bar button {
    padding: 0.75rem 2rem;
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: #059669;
}

/* Filters */
.filters {
    background-color: var(--card-bg);
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.filter-container h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--primary-color);
    background-color: white;
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

..filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.pagination-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.pagination-btn {
    min-width: 44px;
    padding: 0.6rem 0.95rem;
    border-radius: 25px;
    border: 2px solid var(--primary-color);
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover,
.pagination-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    min-height: 60vh;
}

.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Tutorial Card */
.tutorial-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.tutorial-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.tutorial-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--light-bg);
}

.tutorial-content {
    padding: 1.5rem;
}

.tutorial-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.tutorial-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tutorial-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-tag {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.category-info {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.category-info-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.category-info-card img {
    width: 420px;
    max-width: 100%;
    height: 260px;
    object-fit: cover;
}

.category-info-card div {
    padding: 1.5rem;
}

.category-info-card h2 {
    margin: 0 0 0.75rem;
}

.category-info-card p {
    color: var(--text-light);
    line-height: 1.8;
}

@media (max-width: 768px) {
    .category-info-card {
        flex-direction: column;
    }

    .category-info-card img {
        height: 220px;
    }
}

.duration {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.instructor {
    font-size: 0.85rem;
    color: var(--text-light);
}


/* Playful site-wide motion animation */
/* Footer figure removed per user request */

/* Quiz page banner */
.quiz-banner {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    box-shadow: 0 12px 30px rgba(2,6,23,0.6);
    margin-bottom: 16px;
}

@media (max-width:520px) {
    .quiz-banner { height: 120px; border-radius: 10px; }
}

.tutorial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.views {
    font-size: 0.85rem;
    color: var(--text-light);
}

.btn-download {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-download:hover {
    background-color: #4f46e5;
}

/* No Tutorials State */
.no-tutorials {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Admin Panel */
.admin-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 2rem 3rem;
}

.admin-panel {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.admin-panel h2 {
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.login-panel {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.login-form {
    padding: 2rem 0;
}

.login-form p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.logout-button {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.btn-logout-admin {
    background-color: var(--danger-color);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-logout-admin:hover {
    background-color: #dc2626;
}

.tutorial-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--light-bg);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #f1f5f9;
}

    .seo-assistant {
        background-color: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 1.75rem;
        margin-top: 2rem;
    }

    .seo-assistant h3 {
        margin-bottom: 0.75rem;
    }

    .seo-assistant p {
        margin-bottom: 1rem;
        color: var(--text-light);
    }

    .seo-suggestions {
        display: grid;
        gap: 0.75rem;
    }

    .seo-suggestion {
        display: flex;
        gap: 0.75rem;
        align-items: flex-start;
        background-color: white;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 1rem;
    }

    .seo-suggestion span {
        font-size: 1.2rem;
        line-height: 1.2;
    }

    .seo-suggestion p {
        margin: 0;
        color: var(--text-dark);
        line-height: 1.5;
    }

    .empty-state {
        color: var(--text-light);
        font-style: italic;
    }

.btn-delete {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-delete:hover {
    background-color: #dc2626;
}

.divider {
    border-top: 2px solid var(--border-color);
    margin: 2rem 0;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: var(--light-bg);
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
    gap: 1rem;
}

.recent-item-content {
    flex: 1;
}

.recent-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.empty-state {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease-out;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* News cards and buttons */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 1.75rem;
    color: white;
    text-align: center;
}

.theme-dark-page {
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.14), transparent 32rem),
        radial-gradient(circle at bottom left, rgba(34, 197, 94, 0.12), transparent 30rem),
        var(--dark-bg);
    color: #f8fafc;
}

.theme-dark-page .navbar {
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.theme-dark-page .hero {
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(34, 197, 94, 0.14)),
        var(--dark-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-dark-page .section-title {
    color: #f8fafc;
}

.theme-dark-page .container > p,
.theme-dark-page main.container > p {
    max-width: 760px;
    margin: -0.75rem auto 2rem;
    color: #cbd5e1;
    text-align: center;
    line-height: 1.7;
}

.theme-dark-page .footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
}

.theme-hero-copy {
    max-width: 800px;
    margin: 0 auto;
    color: #dbeafe;
}

.theme-icon {
    color: var(--secondary-color);
    margin-right: 10px;
}

.ai-hub-container {
    padding-top: 4rem;
}

.card-icon i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 10px 30px rgba(2,6,23,0.35);
    backdrop-filter: blur(8px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    text-decoration: none;
    color: inherit;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(2,6,23,0.38);
}

.card-top {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.card-body h3 {
    font-size: 1.05rem;
    margin: 0 0 0.35rem 0;
}

.card-body p {
    margin: 0;
    color: rgba(255,255,255,0.9);
    line-height: 1.5;
    font-size: 0.95rem;
}

.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    padding-top: 0.9rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.14);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn:hover {
    background: rgba(255,255,255,0.18);
    transform: translateY(-2px);
}

@media (max-width: 520px) {
    .card {
        padding: 1rem;
        min-height: 160px;
    }
    .card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }
    .card-footer {
        justify-content: stretch;
    }
    .btn {
        width: 100%;
        padding: 0.75rem 1rem;
        border-radius: 10px;
    }
}

/* Footer */
.footer {
    background-color: var(--dark-bg);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.footer p {
    margin: 0.5rem 0;
    opacity: 0.8;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.88;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.policy-page {
    background: var(--light-bg);
    color: var(--text-dark);
    min-height: 70vh;
}

.policy-hero {
    max-width: 920px;
    margin: 0 auto;
    padding: 4rem 2rem 2rem;
}

.policy-hero .eyebrow {
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.policy-hero h1 {
    font-size: 2.6rem;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.policy-hero p {
    color: var(--text-light);
    font-size: 1.08rem;
    line-height: 1.8;
}

.policy-content {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.policy-content h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.policy-content p,
.policy-content li {
    color: var(--text-light);
    line-height: 1.8;
}

.policy-content ul {
    padding-left: 1.25rem;
    margin: 0.75rem 0 1rem;
}

.policy-content a {
    color: var(--primary-color);
    font-weight: 600;
}

.ai-content-card {
    gap: 0.75rem;
}

.prompt-snippet {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.92);
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0.85rem 0 0;
    padding: 0.85rem;
}

.ai-card-meta {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.85rem !important;
    margin-top: 0.85rem !important;
}

/* Responsive Design */

@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }

    .hamburger {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        box-shadow: var(--shadow);
        display: none;
        transition: opacity 0.25s ease, transform 0.25s ease;
        opacity: 0;
        transform: translateY(-10px);
    }

    .nav-menu.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    .nav-menu a,
    .nav-menu button {
        width: 100%;
        text-align: left;
    }

    .hero {
        padding: 2.5rem 0.75rem;
    }

    .hero-content h2 {
        font-size: 1.95rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .search-bar {
        flex-direction: column;
    }

    .banner {
        height: 210px;
    }

    .categories {
        padding: 0 0.75rem;
    }

    .category-card h3 {
        margin: 0.75rem;
        font-size: 1rem;
    }

    .tutorials-grid,
    .forum-layout .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .admin-container {
        padding: 0 0.75rem 1.5rem;
    }

    .admin-panel {
        padding: 1.25rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .recent-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .notification {
        right: 1rem;
        left: 1rem;
    }
}

@media (max-width: 600px) {
    .banner {
        height: 180px;
    }

    .hero-content h2 {
        font-size: 1.75rem;
    }

    .search-bar input,
    .search-bar button {
        width: 100%;
    }

    .nav-menu {
        padding: 0.85rem 0.75rem;
    }

    .nav-menu li {
        width: 100%;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }
    .forum-layout .category-card {
        padding: 1rem;
        border-radius: 12px;
    }
    .category-icon-wrapper {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    .category-card p { display: none; } /* Smaller cards for mobile */
    .category-stats { gap: 0.5rem; flex-direction: column; }
    .category-badge { top: 10px; right: 10px; padding: 2px 6px; font-size: 9px; }
}

@media (max-width: 480px) {
    .hero {
        padding: 1.75rem 0.75rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .banner {
        height: 150px;
    }

    .tutorial-card:hover,
    .category-card:hover {
        transform: none;
    }

}

/* Hide floating bubbles / particle overlays */
.bubble,
.bubbles,
.bubble-container,
.floating-bubbles,
.particle,
.particles,
.particles-js,
#bubbles,
#bubble-container,
[data-purpose="bubble"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Animated logo (moved from index.html) */
.logo-container{
    position:relative;
    animation:float 3s ease-in-out infinite;
    display:inline-block;
}

.logo-container img{
    width:80px;
    height:auto;
    filter:drop-shadow(0 0 12px rgba(0,140,255,0.4));
    animation:glow 2s infinite alternate;
    display:block;
}

@keyframes float{
    0%{transform:translateY(0)}
    50%{transform:translateY(-6px)}
    100%{transform:translateY(0)}
}

@keyframes glow{
    0%{filter:drop-shadow(0 0 6px rgba(0,140,255,0.3))}
    100%{filter:drop-shadow(0 0 18px rgba(0,140,255,0.9))}
}

.ring{
    position:absolute;
    top:50%;
    left:50%;
    width:110px;
    height:110px;
    border:3px solid rgba(0,140,255,0.12);
    border-top:3px solid #008cff;
    border-radius:50%;
    transform:translate(-50%, -50%);
    animation:spin 6s linear infinite;
    pointer-events:none;
}

@keyframes spin{
    0%{transform:translate(-50%, -50%) rotate(0deg)}
    100%{transform:translate(-50%, -50%) rotate(360deg)}
}

/* Responsive adjustments for logo */
@media (max-width: 768px) {
    .logo-container img { width:64px; }
    .ring { width:86px; height:86px; }
}

@media (max-width: 480px) {
    .logo-container img { width:56px; }
    .ring { width:72px; height:72px; }
}

/* Enhanced Mobile Responsiveness for All Pages */
@media (max-width: 640px) {
    /* General Typography */
    body {
        font-size: 0.95rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    /* Navigation */
    .navbar {
        position: sticky;
        top: 0;
        z-index: 999;
    }

    .nav-container {
        padding: 0.75rem 1rem;
    }

    .hamburger {
        display: block;
    }

    .nav-menu {
        gap: 0.75rem;
        padding: 0.5rem 0;
    }

    .nav-menu a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Buttons */
    .btn,
    button {
        min-height: 44px;
        padding: 10px 16px !important;
        font-size: 0.95rem;
        border-radius: 6px;
        touch-action: manipulation;
    }

    .btn i {
        margin-right: 0.5rem;
    }

    /* Forms */
    input,
    textarea,
    select {
        font-size: 1rem !important; /* Prevents iOS zoom */
        padding: 12px !important;
        min-height: 44px;
        width: 100%;
        border-radius: 6px;
    }

    label {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        display: block;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    /* Cards and Containers */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .container {
        padding: 0 0.75rem;
    }

    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Main Content */
    .main {
        padding: 1rem 0;
    }

    /* Grid Layouts */
    .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Flexbox Adjustments */
    .flex-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Section Spacing */
    section {
        padding: 1.5rem 0.75rem;
    }

    /* Footer */
    .footer {
        padding: 1.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    /* Lists */
    ul, ol {
        padding-left: 1.5rem;
        margin-bottom: 1rem;
    }

    li {
        margin-bottom: 0.5rem;
        line-height: 1.6;
    }

    /* Tables */
    table {
        font-size: 0.85rem;
        width: 100%;
        overflow-x: auto;
    }

    /* Modals */
    .modal {
        padding: 1rem;
    }

    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Spacing Utilities */
    .mt-1 { margin-top: 0.5rem; }
    .mt-2 { margin-top: 1rem; }
    .mt-3 { margin-top: 1.5rem; }
    .mb-1 { margin-bottom: 0.5rem; }
    .mb-2 { margin-bottom: 1rem; }
    .mb-3 { margin-bottom: 1.5rem; }
    .px-1 { padding-left: 0.5rem; padding-right: 0.5rem; }
    .py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }

    /* Links */
    a {
        word-break: break-word;
    }

    /* Display Utilities */
    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }

    /* Alert Messages */
    .alert {
        padding: 1rem;
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }
}

/* Extra Small Devices (320px - 375px) */
@media (max-width: 375px) {
    body {
        font-size: 0.9rem;
    }

    h1 {
        font-size: 1.3rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    h3 {
        font-size: 1rem;
    }

    .nav-menu {
        gap: 0.5rem;
    }

    .nav-menu a {
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
        min-height: 40px;
    }

    .btn,
    button {
        min-height: 40px;
        padding: 8px 12px !important;
        font-size: 0.85rem;
    }

    input,
    textarea,
    select {
        padding: 10px !important;
        min-height: 40px;
        font-size: 1rem !important;
    }

    .container {
        padding: 0 0.5rem;
    }

    .card {
        padding: 0.75rem;
    }

    section {
        padding: 1rem 0.5rem;
    }

    .form-group {
        margin-bottom: 0.75rem;
    }
}

/* Button Layout Responsiveness */
@media (max-width: 640px) {
    /* Stack buttons vertically when in flex containers */
    div[style*="display:flex"],
    div[style*="display: flex"] {
        flex-direction: column;
    }

    div[style*="gap:1rem"] {
        gap: 0.5rem !important;
    }

    .btn {
        width: 100%;
    }

    /* Ensure button wrapping */
    button[style*="flex"],
    input[type="submit"][style*="flex"] {
        min-width: 100px;
    }
}

/* Text and Link Adjustments for Mobile */
@media (max-width: 768px) {
    /* Improve link tap targets */
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Ensure text is readable */
    body {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }

    /* Better spacing for touch */
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"] {
        cursor: pointer;
        user-select: none;
    }
}
