@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Lora:wght@400;600;700&family=Oldenburg&display=swap');

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: #fef7ed;
}

h1, h2, h3 {
    font-family: 'Lora', serif;
    font-weight: 600;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #fef7ed;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.logo {
    font-family: 'Lora', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4a5568;
    cursor: pointer;
}

.nav-link {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #2d3748;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #718096;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #4299e1;
    color: white;
}

.btn-primary:hover {
    background: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.btn-secondary {
    background: white;
    color: #4299e1;
    border: 2px solid #4299e1;
}

.btn-secondary:hover {
    background: #4299e1;
    color: white;
}

/* Urgency Statistics Bar */
.urgency-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #fef7ed 0%, #fed7aa 100%);
    border-radius: 12px;
    border: 2px solid #f97316;
}

.stat {
    text-align: center;
    padding: 1rem;
}

.stat .number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ea580c;
    font-family: 'Lora', serif;
}

.stat .label {
    font-size: 0.875rem;
    color: #9a3412;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Urgent Problems List */
.urgent-problems {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-left: 4px solid #ea580c;
}

.urgent-problems h3 {
    color: #9a3412;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.urgent-problems ul {
    list-style: none;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.urgent-problems li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 1.1rem;
    color: #4a5568;
}

.urgent-problems li:last-child {
    border-bottom: none;
}

.urgent-problems li strong {
    color: #ea580c;
    font-weight: 600;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.feature:hover {
    transform: translateY(-2px);
}

.feature h3 {
    margin-bottom: 1rem;
    color: #2d3748;
}

.feature-example {
    margin-top: 1rem;
    padding: 1rem;
    background: #fef7ed;
    border-radius: 6px;
    font-style: italic;
    color: #9a3412;
    font-size: 0.9rem;
}

/* Crisis-Focused Categories */
.problem-categories {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.problem-categories h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2d3748;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.category {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.category.urgent {
    border-color: #ea580c;
    background: linear-gradient(135deg, #fef7ed 0%, #fff 100%);
}

.category:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.category h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.urgency {
    color: #ea580c;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.category li {
    padding: 0.5rem 0;
    color: #4a5568;
    border-bottom: 1px solid #f3f4f6;
}

.category li:last-child {
    border-bottom: none;
}

.category-cta {
    display: inline-block;
    background: #ea580c;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.category-cta:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Social Proof Section */
.social-proof {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    margin-top: 4rem;
}

.social-proof h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2d3748;
}

.proof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.proof-item {
    background: #fef7ed;
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid #ea580c;
}

.result {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.context {
    color: #9a3412;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.problem-solved {
    color: #718096;
    font-size: 0.9rem;
    font-style: italic;
}

.urgency-stats h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2d3748;
    font-size: 1.5rem;
}

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

.stats-row .stat {
    text-align: center;
    padding: 1.5rem;
    background: #fef7ed;
    border-radius: 8px;
    border: 2px solid #fed7aa;
}

.stats-row .stat .number {
    font-size: 2rem;
    font-weight: 700;
    color: #ea580c;
}

.stats-row .stat small {
    color: #9a3412;
    font-size: 0.8rem;
}

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

.trending h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.seo-footer {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    background: white;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.seo-footer a {
    color: #4299e1;
    text-decoration: none;
    font-weight: 500;
}

.library-container {
    display: flex;
    min-height: calc(100vh - 80px);
    position: relative;
}

.profile-sidebar {
    width: 300px;
    background: #fef7ed;
    padding: 1.5rem;
    box-shadow: -2px 0 4px rgba(0,0,0,0.05);
    position: fixed;
    right: 0;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    transform: translateX(0);
    transition: transform 0.3s ease;
    z-index: 100;
}

.profile-sidebar.closed {
    transform: translateX(100%);
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

#profile-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
}

.profile-variable-item {
    margin-bottom: 1rem;
}

.profile-variable-item label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.profile-variable-item input,
.profile-variable-item textarea {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.875rem;
}

.profile-variable-item textarea {
    min-height: 80px;
    font-family: inherit;
    resize: vertical;
}

.profile-variable-item input:focus {
    outline: none;
    border-color: #4299e1;
}

.sidebar {
    width: 300px;
    background: #fef7ed;
    padding: 2rem;
    box-shadow: 2px 0 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.search-hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.search-hero h2 {
    font-family: 'Lora', serif;
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 1.5rem;
}

.main-search-container {
    max-width: 500px;
    margin: 0 auto;
}

#main-search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1.125rem;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

#main-search-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.15);
}

.main-content {
    flex: 1;
    padding: 2rem;
}

#prompt-page .main-content {
    padding-top: 0.5rem;
}

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

#search-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

#search-input:focus {
    outline: none;
    border-color: #4299e1;
}

.favorites-section, .categories-section {
    margin-bottom: 2rem;
}

.favorites-section h3, .categories-section h3 {
    margin-bottom: 1rem;
    color: #2d3748;
}

.category-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    transition: background 0.2s;
}

.category-item:hover {
    background: #f7fafc;
}

.category-item.active {
    background: #ebf8ff;
    color: #3182ce;
}

.category-count {
    color: #718096;
    font-size: 0.875rem;
}

.prompts-grid {
    display: block;
}

.quick-access-section {
    margin-bottom: 3rem;
}

.quick-access-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d3748;
}

.prompts-grid-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.prompt-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.2s;
    cursor: pointer;
    opacity: 0;
    animation: fadeIn 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.prompt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

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

.prompt-card h3 {
    color: #2d3748;
    margin-bottom: 0.5rem;
    flex: 1;
}

.category-badge {
    background: #ebf8ff;
    color: #3182ce;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 1rem;
}

.favorite-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #cbd5e0;
    transition: color 0.2s;
    margin-left: 0.5rem;
}

.favorite-btn.active {
    color: #e53e3e;
}

.prompt-description {
    color: #718096;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag {
    background: #f7fafc;
    color: #4a5568;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.prompt-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    padding-top: 0;
}

.prompt-header {
    margin-bottom: 2rem;
}

.prompt-header h1 {
    margin-bottom: 1rem;
}

.prompt-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.prompt-template {
    font-family: 'Lora', serif;
    font-size: 1.5rem;
    line-height: 1.4;
    color: #2d3748;
    padding: 2rem;
    border-radius: 12px;
    margin: 0 0 2rem 0;
    white-space: pre-wrap;
}

.variable-pill {
    display: inline-block;
    background: #4299e1;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    margin: 0 2px;
    vertical-align: baseline;
}

.variable-pill:hover {
    background: #3182ce;
    transform: scale(1.05);
}

.variable-input {
    background: white;
    border: 2px solid #4299e1;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    min-width: 100px;
    resize: vertical;
}

textarea.variable-input {
    min-height: 80px;
    width: 250px;
    font-family: inherit;
}

.variable-select {
    background: white;
    border: 2px solid #4299e1;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
}

.copy-btn {
    background: #48bb78;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.copy-btn:hover {
    background: #38a169;
}

#mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.variable-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.variable-name {
    font-weight: 500;
    color: #2d3748;
}

.variable-value-input {
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    min-width: 200px;
}

.variable-value-input:focus {
    outline: none;
    border-color: #4299e1;
}

.delete-variable {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 1rem;
}

nav div {
    display: flex;
    gap: 1rem;
    align-items: center;
}

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

.modal-content {
    background: linear-gradient(135deg, #fef7ed 0%, #fed7aa 100%);
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f97316;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #9a3412;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #ea580c;
}

.close:hover {
    color: #9a3412;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body textarea {
    width: 100%;
    border: 2px solid #f97316;
    border-radius: 4px;
    padding: 0.75rem;
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    background: #fefcfb;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f97316;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-secondary {
    background: #fed7aa;
    color: #9a3412;
    border: 1px solid #f97316;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #fdba74;
}

#prompt-content {
    margin-top: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .library-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        display: none;
    }
    
    .sidebar.mobile-open {
        display: block;
    }
    
    #mobile-menu-btn {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .urgency-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .proof-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .urgent-problems ul {
        text-align: left;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .stat .number {
        font-size: 2rem;
    }
}
