/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light theme colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --accent-primary: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: #374151;
    --card-bg: #1f1f1f;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.app {
    min-height: 100vh;
}

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

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.nav {
    display: flex;
    align-items: center;
}

.nav-brand .brand-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.025em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    margin-left: 3rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
}

.share-prompt-btn {
    background-color: var(--accent-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.share-prompt-btn:hover {
    background-color: var(--accent-hover);
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 5rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.super-heading {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

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

/* Sections */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Prompts Grid */
.prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.prompt-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

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

.prompt-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.prompt-content {
    padding: 1.5rem;
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.prompt-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.like-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.like-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--accent-primary);
}

.like-btn.liked {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.prompt-snippet {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prompt-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-btn {
    background-color: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

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

.prompt-author {
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

.explore-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.125rem;
    transition: color 0.2s ease;
}

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

/* Community Resources */
.community-resources {
    background-color: var(--bg-secondary);
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    margin: 5rem 0;
    text-align: center;
}

.resources-content {
    margin-bottom: 3rem;
}

.cta-section .super-heading {
    margin-top: 2rem;
}

.cta-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.cta-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.submit-btn {
    background-color: var(--accent-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    transition: background-color 0.2s ease;
}

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

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--text-primary);
}

/* Explore Page */
.explore-page {
    background-color: var(--bg-primary);
}

.explore-header {
    text-align: center;
    margin-bottom: 3rem;
}

.explore-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.explore-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.explore-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
}

.filters-sidebar {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.search-section {
    margin-bottom: 2rem;
}

.search-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.search-section p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.search-btn {
    background-color: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

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

.tags-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.tag-category {
    margin-bottom: 1.5rem;
}

.tag-category h4 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.tag:hover,
.tag.active {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.explore-prompts {
    min-height: 500px;
}

.load-more {
    text-align: center;
    margin-top: 2rem;
}

.load-more-btn {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem 2rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

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

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.5rem;
}

.modal-close:hover {
    color: var(--text-primary);
}

.submit-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-secondary {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

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

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--accent-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .nav-links {
        margin-left: 0;
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .prompts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .explore-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .filters-sidebar {
        position: static;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }

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

@media (max-width: 480px) {
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

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

    .prompt-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .prompt-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}