/* APrompts - Main Stylesheet */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #ffffff;
    --text-primary: #000000;
    --text-secondary: #666666;
    --accent: #2962ff;
    --border: #e5e5e5;
    --hover-bg: #f8f9fa;
    --success: #10b981;
    --error: #ef4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* Header */
.promo-bar {
    background: var(--text-primary);
    color: white;
    padding: 0.5rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.promo-bar a {
    color: white;
    text-decoration: underline;
    font-weight: 700;
    margin-left: 0.5rem;
}

.promo-bar a:hover {
    opacity: 0.9;
}

header {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

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

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.btn-subscribe {
    background: var(--text-primary);
    color: white !important;
    padding: 0.625rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
}

.btn-subscribe:hover {
    opacity: 0.85;
}

/* Hero */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 3rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.subscriber-count {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.subscriber-count strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Newsletter Form */
.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 0.75rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--text-primary);
}

.newsletter-form button {
    background: var(--text-primary);
    color: white;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: 'Inter', sans-serif;
}

.newsletter-form button:hover {
    opacity: 0.85;
}

/* Alerts */
.alert {
    max-width: 500px;
    margin: 1.5rem auto 0;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9375rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Sections */
.posts-section,
.featured-prompts {
    padding: 3rem 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

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

.post-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
    background: white;
}

.post-card:hover {
    border-color: var(--text-primary);
}

.post-image {
    width: 100%;
    aspect-ratio: 2 / 1;
    background: #f3f4f6;
}

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

.post-content {
    padding: 1.5rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
}

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

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

.post-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

.prompt-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    background: white;
    transition: all 0.2s;
}

.prompt-card:hover {
    border-color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.prompt-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f3f4f6;
    color: var(--text-secondary);
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.prompt-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.prompt-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.prompt-card h3 a:hover {
    color: var(--accent);
}

.prompt-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.prompt-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Features */
.features-section {
    background: #fafafa;
    padding: 5rem 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 3rem;
}

.feature-item {
    text-align: center;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Stats */
.stats-section {
    padding: 5rem 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

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

/* CTA */
.cta-section {
    background: var(--text-primary);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
}

.cta-container {
    max-width: 700px;
    margin: 0 auto;
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
}

.cta-section p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
}

.cta-section .newsletter-form button {
    background: white;
    color: var(--text-primary);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: var(--text-primary);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.85;
}

.text-center {
    text-align: center;
}

/* Placeholders */
.placeholder-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.placeholder-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.placeholder-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.placeholder-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.placeholder-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.placeholder-6 {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

/* Page Header */
.page-header {
    padding: 3rem 2rem 2rem;
    border-bottom: 1px solid var(--border);
    background: white;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Prompts Page */
.prompts-page {
    padding: 3rem 0;
}

.filters-bar {
    margin-bottom: 2.5rem;
}

.search-box {
    margin-bottom: 1.5rem;
}

.search-box form {
    display: flex;
    gap: 0.75rem;
    max-width: 500px;
}

.search-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9375rem;
}

.search-box button {
    padding: 0.75rem 1.5rem;
    background: var(--text-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-tag {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-tag:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.filter-tag.active {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.page-link:hover {
    background: var(--hover-bg);
}

.page-link.active {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
}

/* Responsive */
@media (max-width: 968px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .features-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .posts-grid,
    .prompts-grid {
        grid-template-columns: 1fr;
    }

    .search-box form {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 3rem 1rem;
    }

    .hero h1 {
        font-size: 1.875rem;
    }

    .page-header {
        padding: 2rem 1rem;
    }

    .page-header h1 {
        font-size: 1.875rem;
    }
}

/* Footer */
footer {
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--border);
    background: #ffffff;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand {
    max-width: 320px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.footer-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--hover-bg);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.social-link svg {
    width: 18px;
    height: 18px;
}

.social-link:hover {
    background: var(--text-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.footer-column ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (max-width: 968px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .footer-brand {
        grid-column: span 2;
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: span 1;
    }
}