/* IdeaMunk Web App Styles */

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

:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --secondary: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --bg: #F9FAFB;
    --card-bg: #FFFFFF;
    --text: #1F2937;
    --text-light: #6B7280;
    --border: #E5E7EB;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

/* Header */
.header {
    background: var(--card-bg);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
}

.logo a {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
}

.logo img {
    height: 36px;
    width: 36px;
}

.logo h1 {
    font-size: 22px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: -0.3px;
    margin: 0;
    line-height: 1.2;
}

.tagline {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.3;
}

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

.nav a {
    text-decoration: none;
    color: var(--text-light);
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 15px;
    font-weight: 500;
}

.nav a:hover {
    color: var(--primary);
    background: #EEEDFF;
}

.nav span {
    padding: 8px 12px;
    color: var(--text-light);
    font-size: 14px;
}

.btn-primary {
    background: var(--primary) !important;
    color: white !important;
    padding: 9px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
    transition: all 0.2s !important;
}

.btn-primary:hover {
    background: var(--primary-dark) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3) !important;
    transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 30px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.stat {
    flex: 1;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--text-light);
    font-size: 14px;
}

/* Filters */
.filters-section {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 16px;
}

.search-btn,
.filter-btn {
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.search-btn:hover,
.filter-btn:hover {
    background: var(--primary-dark);
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

.clear-filters {
    padding: 10px 16px;
    color: var(--text-light);
    text-decoration: none;
}

/* Pain Points List */
.pain-point-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.pain-point-title a {
    color: var(--text);
    text-decoration: none;
    font-size: 20px;
}

.pain-point-title a:hover {
    color: var(--primary);
}

.pain-point-meta {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-light);
}

.pain-point-summary {
    margin: 16px 0;
    padding: 12px;
    background: var(--bg);
    border-radius: 6px;
}

.pain-point-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.tag {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
}

.tag-category {
    background: #DBEAFE;
    color: #1E40AF;
}

.tag-severity {
    background: #FEE2E2;
    color: #991B1B;
}

.severity-medium {
    background: #FEF3C7;
    color: #92400E;
}

.severity-low {
    background: #D1FAE5;
    color: #065F46;
}

.tag-potential {
    background: #E0E7FF;
    color: #3730A3;
}

.pain-point-keywords {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.keyword {
    font-size: 12px;
    color: var(--text-light);
    background: var(--bg);
    padding: 3px 8px;
    border-radius: 4px;
}

.pain-point-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.view-reddit {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 30px 0;
}

.pagination-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
}

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

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.pricing-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    position: relative;
}

.pricing-card.popular,
.pricing-card.best-value {
    border-color: var(--primary);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.price {
    font-size: 48px;
    font-weight: bold;
    color: var(--primary);
    margin: 10px 0;
}

.features {
    list-style: none;
    margin: 20px 0;
}

.features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--bg);
}

.btn-select {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
}

.btn-select:hover {
    background: var(--primary-dark);
}

/* Forms and Buttons */
input[type="email"],
input[type="password"],
input[type="text"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

button:not(.menu-toggle),
input[type="submit"],
.btn {
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

button:not(.menu-toggle):hover,
input[type="submit"]:hover,
.btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    transform: translateY(-1px);
}

button:not(.menu-toggle):active,
input[type="submit"]:active,
.btn:active {
    transform: translateY(0);
}

/* Auth Forms */
.auth-container {
    max-width: 400px;
    margin: 60px auto;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.auth-container h2 {
    margin-bottom: 24px;
    text-align: center;
    color: var(--text);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-footer {
    margin-top: 24px;
    text-align: center;
    color: var(--text-light);
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

.error-message {
    background: #FEE2E2;
    color: #991B1B;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #EF4444;
}

.success-message {
    background: #D1FAE5;
    color: #065F46;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #10B981;
}

/* Footer */
.footer {
    background: #1F2937;
    color: #9CA3AF;
    padding: 50px 0 30px;
    margin-top: 60px;
}

.footer h3 {
    color: #F9FAFB;
}

.footer a {
    color: #9CA3AF;
    transition: color 0.2s;
}

.footer a:hover {
    color: #F9FAFB;
}

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

    .header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        text-align: left;
        width: auto;
    }

    .logo a {
        justify-content: flex-start !important;
    }

    /* Show hamburger menu toggle on mobile */
    .menu-toggle {
        display: flex !important;
        z-index: 1001;
    }

    /* Hide navigation by default on mobile */
    .nav {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 250px;
        height: 100vh;
        background: var(--card-bg);
        flex-direction: column;
        padding: 80px 20px 20px;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        z-index: 1000;
        overflow-y: auto;
    }

    /* Show navigation when active */
    .nav.active {
        display: flex !important;
    }

    .nav a,
    .nav span {
        font-size: 16px;
        padding: 12px 16px;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--border);
    }

    .nav .btn-primary {
        margin-top: 10px;
        text-align: center;
    }

    .logo h1 {
        font-size: 18px;
    }

    .tagline {
        font-size: 11px;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-select,
    .filter-btn {
        width: 100%;
    }

    .stats-bar {
        flex-direction: column;
        gap: 15px;
    }

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

    .auth-container {
        padding: 30px 20px;
        margin: 30px auto;
    }

    .pain-point-meta {
        flex-direction: column;
        gap: 8px;
    }

    /* Mobile Navigation */
    .menu-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 68px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 68px);
        background: var(--card-bg);
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 10px;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .nav.active {
        right: 0;
    }

    .nav a {
        width: 100%;
        text-align: left;
    }
}
