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

:root {
    --bg-body: #fafafc;
    --bg-card: #ffffff;
    --bg-navbar: rgba(255,255,255,0.98);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --border-color: #eef2f6;
    --chip-bg: #f3f4f6;
    --input-bg: #f8fafc;
    --modal-bg: #ffffff;
    --faq-bg: #ffffff;
    --primary-color: #ff8c42;
    --secondary-color: #6366f1;
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.03);
    --shadow-lg: 0 8px 20px rgba(0,0,0,0.08);
}

body.dark {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-navbar: #0f172a;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --chip-bg: #334155;
    --input-bg: #334155;
    --modal-bg: #1e293b;
    --faq-bg: #1e293b;
    --primary-color: #ff8c42;
    --secondary-color: #818cf8;
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.2);
    --shadow-lg: 0 8px 20px rgba(0,0,0,0.3);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    transition: background 0.2s, color 0.2s;
}

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

/* ============================================ */
/* NAVBAR */
/* ============================================ */
.navbar {
    background: var(--bg-navbar);  /* FIXED: typo */
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}
.logo img {
    max-height: 45px;
    width: auto;
    object-fit: contain;
}

@media (max-width: 640px) {
    .logo img {
        max-height: 35px;
    }
}
.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo {
    font-size: 1.7rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1f2b3c, #2a3f5e);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.dark .logo {
    background: linear-gradient(135deg, #ff8c42, #ffaa66);
    -webkit-background-clip: text;
    background-clip: text;
}

.logo span {
    color: var(--primary-color);
    background: none;
}

/* Logo Image */
.logo img {
    height: 40px;
    width: auto;
    vertical-align: middle;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-btn {
    background: var(--chip-bg);
    border: none;
    border-radius: 999px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.2s;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark .nav-btn {
    background: #334155;
    color: #f1f5f9;
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--primary-color);
    color: white !important;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    min-width: 180px;
    display: none;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a,
.dropdown-user {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.dropdown-user {
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.dropdown-menu a:hover {
    background: var(--chip-bg);
}

/* Search Float */
.search-float {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    z-index: 99;
}

.search-float.open {
    max-height: 85px;
}

.search-inner {
    padding: 14px 20px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 48px;
    padding: 10px 20px;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 140, 66, 0.2);
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.clear-search {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
}

/* Side Menu */
.menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100%;
    background: var(--bg-card);
    z-index: 200;
    transition: right 0.25s ease;
    padding: 70px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left: 1px solid var(--border-color);
}

.menu-overlay.open {
    right: 0;
}

.menu-overlay a {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    transition: 0.2s;
}

.menu-overlay a:hover {
    color: var(--primary-color);
    padding-left: 8px;
}

.close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
    display: none;
}

.overlay-backdrop.show {
    display: block;
}

/* ============================================ */
/* HERO */
/* ============================================ */
.hero {
    padding: 48px 0 32px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(1.8rem, 6vw, 3rem);
    font-weight: 800;
    background: linear-gradient(145deg, var(--primary-color), #2a3f5e);
    background-clip: text;
    -webkit-background-clip: text;
    
}

.hero-badge {
    display: inline-block;
    background: var(--chip-bg);
    border-radius: 40px;
    padding: 6px 18px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 16px;
}

/* ============================================ */
/* FILTER TABS */
/* ============================================ */
.filter-section {
    margin: 32px 0 40px;
}

.filter-tabs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.filter-chip {
    background: var(--chip-bg);
    padding: 8px 22px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-primary);
    white-space: nowrap;
}

body.dark .filter-chip {
    background: #334155;
    color: #f1f5f9;
}

.filter-chip.active,
.filter-chip:hover {
    background: var(--primary-color);
    color: white !important;
}

/* ============================================ */
/* PROMPT GRID */
/* ============================================ */
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 24px 0 20px;
}

.prompt-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 40px;
}

@media (min-width: 640px) {
    .prompt-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .prompt-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.prompt-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.prompt-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.card-img {
    width: 100%;
    height: 200px;
    cursor: pointer;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-img i {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3rem;
    color: var(--primary-color);
}

.card-content {
    padding: 18px;
}

.prompt-category {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    cursor: pointer;
    display: inline-block;
}

.prompt-title {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 10px;
    cursor: pointer;
}

.prompt-title:hover {
    color: var(--primary-color);
}

.prompt-desc-short,
.prompt-desc-full {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.toggle-desc {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    margin: 6px 0 10px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.left-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.like-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

body.dark .like-btn {
    color: #94a3b8;
}

.like-btn:hover {
    color: var(--primary-color) !important;
    transform: scale(1.05);
}

.like-btn.liked {
    color: #ff3b6f !important;
}

.views {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

body.dark .views {
    color: #94a3b8;
}

.copy-btn {
    background: var(--chip-bg);
    border: none;
    padding: 6px 14px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

body.dark .copy-btn {
    background: #334155;
    color: #f1f5f9;
}

.copy-btn:hover,
.copy-btn.copied {
    background: var(--primary-color);
    color: white !important;
}

/* ============================================ */
/* LOAD MORE BUTTON */
/* ============================================ */
.load-more-container {
    text-align: center;
    margin: 20px 0 40px;
}

.load-more-btn {
    background: var(--primary-color);
    border: 2px solid var(--border-color);
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-primary);
}

body.dark .load-more-btn {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

.load-more-btn:hover {
    background: var(--primary-color);
    color: white !important;
    border-color: var(--primary-color);
}

.load-more-container.hidden {
    display: none;
}

/* ============================================ */
/* ABOUT SECTION */
/* ============================================ */
.about-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px 32px;
    margin: 40px 0;
    text-align: center;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============================================ */
/* MODAL */
/* ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--modal-bg);
    width: 90%;
    max-width: 520px;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: modalAppear 0.25s ease-out;
    margin: 0 auto;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 24px 24px 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-color);
}

.title-group h2 {
    margin: 0 0 8px 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.badge-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-cat {
    background: #fee2e2;
    color: #ef4444;
}

body.dark .badge-cat {
    background: #7f1d1d;
    color: #fca5a5;
}

.badge-hot {
    background: linear-gradient(135deg, #ffedd5, #ff8c42);
    color: #7c2d12;
}

body.dark .badge-hot {
    background: linear-gradient(135deg, #7c2d12, #ff8c42);
    color: #fed7aa;
}

.modal-close {
    background: #e2e8f0;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #475569;
    flex-shrink: 0;
}

.modal-close:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.05);
}

body.dark .modal-close {
    background: #334155;
    color: #94a3b8;
}

body.dark .modal-close:hover {
    background: #ef4444;
    color: white;
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

body.dark .modal-body::-webkit-scrollbar-thumb {
    background: #475569;
}

.image-preview {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    background: var(--chip-bg);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.image-preview i {
    font-size: 3.5rem;
    color: var(--primary-color);
    padding: 40px;
}

.prompt-section {
    margin-bottom: 16px;
}

.prompt-label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.prompt-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--input-bg);
    padding: 14px 16px;
    border-radius: 16px;
    font-family: monospace;
}

.modal-footer {
    padding: 16px 24px 24px 24px;
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.btn {
    padding: 10px 16px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    flex: 2;
}

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

.share-btn {
    background: var(--chip-bg);
    color: var(--text-primary);
    flex: 1;
}

body.dark .share-btn {
    background: #334155;
    color: #f1f5f9;
}

.share-btn:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
}

.share-wa {
    background: #25D366;
    color: white;
}

.share-wa:hover {
    background: #128C7E;
}

.share-x {
    background: #000000;
    color: white;
}

body.dark .share-x {
    background: #1DA1F2;
}

.share-x:hover {
    background: #0f8bc9;
}

/* Responsive Modal */
@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        border-radius: 24px;
    }
    
    .modal-header {
        padding: 20px 20px 12px;
    }
    
    .title-group h2 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 16px 20px;
    }
    
    .modal-footer {
        padding: 16px 20px 20px;
        flex-wrap: wrap;
    }
    
    .btn-primary {
        flex: 1 1 100%;
    }
    
    .share-btn {
        flex: 1;
    }
}

/* ============================================ */
/* FOOTER */
/* ============================================ */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 24px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col a {
    text-decoration: none;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: var(--chip-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: 0.2s;
}

body.dark .social-links a {
    background: #334155;
    color: #f1f5f9;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
}

.newsletter-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 40px;
    background: var(--input-bg);
    color: var(--text-primary);
}

.newsletter-form button {
    background: var(--primary-color);
    border: none;
    padding: 0 16px;
    border-radius: 40px;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

.newsletter-form button:hover {
    background: var(--secondary-color);
}

.copyright {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
}

/* ============================================ */
/* TOAST & UTILITIES */
/* ============================================ */
.toast-msg {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 10px 4px;
    border-radius: 40px;
    font-size: 0.85rem;
    opacity: 0;
    transition: 0.2s;
    z-index: 1100;
}

.toast-msg.show {
    opacity: 1;
}

.toast-msg.error {
    background: #ef4444;
}

.no-results {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px;
}

/* Link Hover Global */
a:hover,
.prompt-title:hover,
.prompt-category:hover,
.footer-col a:hover,
.menu-overlay a:hover {
    color: var(--primary-color) !important;
    transition: color 0.2s ease;
}