:root {
    --bg-main: #fafafa;
    --bg-card: #ffffff;
    --text-primary: #09090b;
    --text-secondary: #52525b;
    --accent: #000000;
    --accent-hover: #27272a;
    --accent-gradient: linear-gradient(135deg, #18181b, #3f3f46);
    --border: #e4e4e7;
    --border-light: #f4f4f5;
    --success: #10b981;
    --whatsapp: #25D366;
    --telegram: #0088cc;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-glow: 0 0 20px rgba(0, 0, 0, 0.05);
    --transition-snappy: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .logo {
    font-family: 'Outfit', sans-serif;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

@media (min-width: 640px) {
    .container { padding: 0 2rem; }
}

/* Header & Nav */
header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 9999;
    transition: transform 0.4s var(--transition-snappy), background 0.3s ease;
}

header.nav-up {
    transform: translateY(-100%);
}

.header-top {
    padding: 1.25rem 0;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (min-width: 640px) {
    .header-top-content {
        flex-wrap: nowrap;
        gap: 0;
    }
}

.header-bottom {
    padding: 0 0 1rem 0;
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

@media (min-width: 640px) {
    .logo { font-size: 1.5rem; }
}

.logo-icon {
    font-size: 1.2rem;
    animation: float 3s ease-in-out infinite;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--text-secondary);
}

.search-box input {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,0.8);
    color: var(--text-primary);
    width: 100%;
    transition: all 0.3s var(--transition-snappy);
    outline: none;
}
@media (min-width: 640px) {
    .search-box { width: auto; }
    .search-box input { width: 280px; }
}

.search-box input:focus {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
    background: #fff;
}

.categories-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.25rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 1024px) {
    .categories-nav {
        justify-content: center;
        flex-wrap: wrap;
        overflow-x: visible;
    }
}

.categories-nav::-webkit-scrollbar { display: none; }

.cat-btn {
    font-family: 'Inter', sans-serif;
    background: rgba(0,0,0,0.03);
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s var(--transition-snappy);
    flex-shrink: 0;
}

.cat-btn:hover {
    background: rgba(0,0,0,0.06);
    color: var(--text-primary);
}

.cat-btn.active {
    background: var(--text-primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

/* Hero */
.hero {
    text-align: center;
    padding: 5rem 0 3rem;
    position: relative;
}
/* Subtle glow behind hero */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,0,0,0.03) 0%, rgba(250,250,250,0) 70%);
    z-index: -1;
    pointer-events: none;
}

@media (min-width: 768px) {
    .hero { padding: 7rem 0 4rem; }
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

@media (min-width: 640px) {
    .hero h1 { font-size: 4rem; }
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.trending-searches {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    overflow-x: auto;
    padding: 0.5rem 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.trending-searches::-webkit-scrollbar {
    display: none;
}

@media (min-width: 640px) {
    .trending-searches {
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: visible;
        padding: 0;
    }
}

.trending-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.trend-pill {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 8px;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.trend-pill:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

@media (min-width: 640px) {
    .hero p { font-size: 1.25rem; }
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUpAnim 0.8s var(--transition-snappy) forwards;
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Grid */
.prompts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
}

@media (min-width: 640px) {
    .prompts-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; padding: 2rem 0; }
}

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

/* Prompt Card - 3D Hover & Gradients */
.prompt-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s var(--transition-snappy);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    position: relative;
    /* For 3D transform */
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Invisible border gradient wrapper trick */
.prompt-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(0,0,0,0.1), transparent, rgba(0,0,0,0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s var(--transition-snappy);
}

@media (hover: hover) and (pointer: fine) {
    .prompt-card:hover {
        transform: translateY(-8px) scale(1.01) rotateX(2deg) rotateY(-1deg);
        box-shadow: var(--shadow-lg), var(--shadow-glow);
        border-color: transparent;
    }
    .prompt-card:hover::before {
        opacity: 1;
    }
    .prompt-card:hover .card-image {
        transform: scale(1.08);
    }
}

.prompt-card:active {
    transform: scale(0.97);
}

.card-image-wrap {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #f4f4f5;
    overflow: hidden;
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* Buttons */
.btn {
    font-family: 'Outfit', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s var(--transition-snappy);
    color: white;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: 0.01em;
}

.btn.primary {
    background: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (hover: hover) {
    .btn.primary:hover {
        background: var(--accent-hover);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
        transform: translateY(-2px);
    }
}
.btn.primary:active {
    transform: scale(0.96);
}

/* View Post Specifics */
#view-post-container {
    display: none;
    padding: 2rem 0 4rem;
}

.back-btn {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-primary);
    margin-bottom: 2rem;
    border-radius: 999px;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}
@media (hover: hover) {
    .back-btn:hover { background: #f4f4f5; transform: translateX(-4px); }
}

.post-article {
    background: transparent;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.post-hero-wrap {
    width: 100%;
    height: 50vh;
    min-height: 400px;
    border-radius: 24px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
}

.post-hero-img {
    width: 100%;
    height: 120%; /* Extra height for parallax */
    position: absolute;
    top: -10%;
    left: 0;
    object-fit: cover;
    will-change: transform;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .post-title { font-size: 3.5rem; }
}

.post-meta {
    font-family: 'Outfit', sans-serif;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.post-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-primary);
    background: white;
    padding: 1.5rem 1rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

@media (min-width: 640px) {
    .post-body {
        padding: 4rem;
        font-size: 1.25rem;
    }
}

.post-body p { margin-bottom: 1.5rem; color: #3f3f46; }

.post-body a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
    transition: all 0.2s ease;
}

.post-body a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.post-body h2, .post-body h3 { margin: 2.5rem 0 1rem; color: var(--text-primary); }

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin: 2.5rem auto;
    display: block;
}

/* macOS Style Premium Prompt Box */
.premium-prompt-box {
    background: #fafafa;
    border: 1px solid #e4e4e7;
    border-radius: 16px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

@media (min-width: 640px) {
    .premium-prompt-box {
        padding: 2rem;
        margin: 2.5rem 0;
    }
}

/* macOS Dots */
.premium-prompt-box::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444; /* red */
    box-shadow: 16px 0 0 #eab308, 32px 0 0 #22c55e; /* yellow, green */
}

.premium-prompt-text {
    font-family: 'Inter', monospace;
    font-size: 1rem;
    color: #27272a;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #f4f4f5;
    border-radius: 12px;
    line-height: 1.7;
    word-break: break-word;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.premium-prompt-text::-webkit-scrollbar { width: 6px; }
.premium-prompt-text::-webkit-scrollbar-track { background: transparent; }
.premium-prompt-text::-webkit-scrollbar-thumb { background: #d4d4d8; border-radius: 3px; }

.premium-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.premium-actions .btn { flex: 1 1 auto; }
.premium-actions .btn-copy { background: var(--text-primary); flex: 1 1 0; min-width: 140px; }
@media (hover: hover) { .premium-actions .btn-copy:hover { background: var(--accent-hover); } }
.premium-actions .btn-copy.copied { background: var(--success); }

.premium-actions .btn-icon {
    flex: 0 0 52px;
    padding: 0;
    background: white;
    border: 1px solid var(--border);
    color: var(--text-primary);
}
@media (hover: hover) {
    .premium-actions .btn-icon:hover { background: #f4f4f5; }
}

/* Loading States */
.load-more-container { text-align: center; padding: 3rem 0 5rem; }

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
    display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Shimmer Skeletons */
.skeleton { background: white; border-color: transparent; box-shadow: var(--shadow-sm); }
.skeleton-img, .skeleton-text, .skeleton-pill {
    background: linear-gradient(90deg, #f4f4f5 25%, #e4e4e7 50%, #f4f4f5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}
.skeleton-img { width: 100%; padding-top: 100%; }
.skeleton-text { height: 1rem; border-radius: 6px; margin: 1.5rem; }
.skeleton-text.short { width: 60%; margin-top: -0.75rem; }
.skeleton-pill { width: 80px; height: 36px; border-radius: 999px; flex-shrink: 0; }

@keyframes shimmer {
    to { background-position: -200% 0; }
}

/* Mega Footer */
.mega-footer {
    background: white;
    border-top: 1px solid var(--border-light);
    padding-top: 5rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

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

@media (min-width: 1024px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 2rem; }
}

.brand-col .footer-logo { font-size: 1.5rem; margin-bottom: 1rem; }
.brand-col .footer-tagline { color: var(--text-secondary); font-size: 1rem; max-width: 300px; }

.footer-col h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
}
.footer-col ul li a:hover { color: var(--text-primary); }

.newsletter-col p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}
.newsletter-form input:focus { border-color: var(--text-primary); }
.newsletter-form .btn { padding: 0.75rem 1.25rem; }

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s var(--transition-snappy);
    cursor: pointer;
    z-index: 10000;
    font-family: 'Outfit', sans-serif;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}
