/* ========================================
   Cannapedia - Wikipedia-Inspired Styles
   ======================================== */

/* CSS Variables */
:root {
    --color-primary: #16a34a;
    --color-primary-dark: #15803d;
    --color-primary-light: #22c55e;
    --color-text: #202122;
    --color-text-light: #54595d;
    --color-link: #0645ad;
    --color-link-visited: #0b0080;
    --color-link-hover: #3366cc;
    --color-border: #a2a9b1;
    --color-border-light: #c8ccd1;
    --color-bg: #ffffff;
    --color-bg-secondary: #f8f9fa;
    --color-bg-box: #f8f9fa;
    --color-indica: #6366f1;
    --color-sativa: #f59e0b;
    --color-hybrid: #22c55e;
    --color-success: #16a34a;
    --color-error: #dc2626;
    --color-warning: #f59e0b;

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Lato, Helvetica, Arial, sans-serif;
    --font-serif: 'Linux Libertine', 'Georgia', 'Times', serif;

    --max-width: 1200px;
    --content-width: 800px;
    --sidebar-width: 280px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --radius-sm: 3px;
    --radius-md: 6px;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: normal;
    line-height: 1.3;
    margin-top: 1em;
    margin-bottom: 0.5em;
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: 0.2em;
}

h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.2em; border-bottom: none; }
h4 { font-size: 1.1em; border-bottom: none; }

a {
    color: var(--color-link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:visited {
    color: var(--color-link-visited);
}

p {
    margin: 0.5em 0 1em;
}

ul, ol {
    margin: 0.5em 0 1em;
    padding-left: 2em;
}

li {
    margin-bottom: 0.25em;
}

code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    background: var(--color-bg-secondary);
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border-light);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5em;
    font-weight: bold;
    color: var(--color-primary-dark);
    text-decoration: none;
}

.logo:visited {
    color: var(--color-primary-dark);
}

.logo:hover {
    text-decoration: none;
}

.logo-icon {
    font-size: 1.2em;
}

.main-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--color-text);
    font-size: 0.95em;
    padding: 5px 0;
}

.main-nav a:visited {
    color: var(--color-text);
}

.main-nav a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.header-actions {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
}

/* Messages */
.messages-container {
    padding: 10px 0;
}

.message {
    padding: 12px 40px 12px 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    position: relative;
}

.message-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

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

.message-info {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.message-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    opacity: 0.5;
}

.message-close:hover {
    opacity: 1;
}

/* Main Content */
.site-main {
    min-height: calc(100vh - 200px);
    padding: 20px 0;
}

/* Footer */
.site-footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border-light);
    padding: 30px 0;
    margin-top: 40px;
    font-size: 0.85em;
    color: var(--color-text-light);
}

.footer-links {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-text-light);
}

.copyright {
    margin-top: 20px;
}

/* Homepage */
.home-hero {
    text-align: center;
    padding: 80px 20px;
}

.home-title {
    font-size: 3.5em;
    margin-bottom: 0.2em;
    border: none;
    color: var(--color-primary-dark);
}

.home-subtitle {
    font-size: 1.3em;
    color: var(--color-text-light);
    margin-bottom: 40px;
}

.home-links {
    margin-top: 30px;
    font-size: 0.95em;
}

.home-links .divider {
    color: var(--color-border);
    margin: 0 5px;
}

.home-stats {
    margin-top: 40px;
    color: var(--color-text-light);
    font-size: 0.9em;
}

.home-section {
    padding: 40px 0;
    border-top: 1px solid var(--color-border-light);
}

.home-section h2 {
    text-align: center;
    border: none;
}

.home-about {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.category-card {
    display: block;
    padding: 30px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.category-card:visited {
    color: white;
}

.category-card h3 {
    margin: 0 0 10px;
    border: none;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.3em;
}

.category-card p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95em;
}

.category-indica { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.category-sativa { background: linear-gradient(135deg, #f59e0b, #d97706); }
.category-hybrid { background: linear-gradient(135deg, #22c55e, #16a34a); }

/* Learn Grid */
.learn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.learn-card {
    display: block;
    padding: 25px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text);
    transition: border-color 0.2s;
}

.learn-card:hover {
    border-color: var(--color-primary);
    text-decoration: none;
}

.learn-card:visited {
    color: var(--color-text);
}

.learn-card h3 {
    margin: 0 0 10px;
    border: none;
    font-family: var(--font-sans);
    font-weight: 600;
}

.learn-card p {
    margin: 0;
    color: var(--color-text-light);
    font-size: 0.95em;
}

/* Search */
.search-form {
    position: relative;
}

.search-form-large {
    max-width: 600px;
    margin: 0 auto;
}

.search-wrapper {
    display: flex;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: white;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.1em;
    border: none;
    outline: none;
}

.search-btn {
    padding: 15px 30px;
    background: var(--color-primary);
    color: white;
    border: none;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}

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

.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    display: none;
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}

.search-autocomplete.active {
    display: block;
}

.autocomplete-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border-light);
    text-decoration: none;
    color: var(--color-text);
}

.autocomplete-item:hover {
    background: var(--color-bg-secondary);
    text-decoration: none;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.search-page {
    max-width: 800px;
    margin: 0 auto;
}

.search-query {
    margin: 20px 0;
    color: var(--color-text-light);
}

.no-results {
    text-align: center;
    padding: 40px 0;
}

.generate-prompt {
    margin-top: 30px;
    padding: 30px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
}

.generate-note {
    color: var(--color-text-light);
    font-size: 0.9em;
    margin-bottom: 20px;
}

/* Strain Article */
.strain-article {
    max-width: var(--max-width);
    margin: 0 auto;
}

.strain-header {
    margin-bottom: 20px;
}

.strain-header h1 {
    margin-bottom: 10px;
}

/* Wikipedia-style strain image infobox */
.strain-infobox {
    float: right;
    clear: right;
    margin: 0 0 15px 20px;
    padding: 5px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    max-width: 280px;
    text-align: center;
}

.strain-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}

.strain-image-caption {
    font-size: 0.85em;
    color: var(--color-text-light);
    margin: 8px 0 3px;
    font-style: italic;
}

.strain-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.alternate-names {
    color: var(--color-text-light);
    font-size: 0.9em;
    margin-top: 5px;
}

.strain-category {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
    font-weight: 500;
    text-transform: uppercase;
}

.category-indica { background: #e0e7ff; color: var(--color-indica); }
.category-sativa { background: #fef3c7; color: #b45309; }
.category-hybrid { background: #dcfce7; color: #166534; }

.ai-badge {
    font-size: 0.75em;
    padding: 2px 8px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: var(--radius-sm);
}

.strain-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 40px;
}

.strain-section {
    margin-bottom: 30px;
}

.strain-section h2 {
    font-size: 1.3em;
}

.strain-description {
    line-height: 1.7;
}

/* Info Box (Sidebar) */
.info-box {
    background: var(--color-bg-box);
    border: 1px solid var(--color-border-light);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--radius-sm);
}

.info-box h3 {
    margin-top: 0;
    font-size: 1em;
    font-family: var(--font-sans);
    font-weight: 600;
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: 8px;
}

.facts-list {
    margin: 0;
}

.facts-list dt {
    font-weight: 600;
    color: var(--color-text-light);
    font-size: 0.9em;
    margin-top: 10px;
}

.facts-list dt:first-child {
    margin-top: 0;
}

.facts-list dd {
    margin: 0;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    background: white;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

/* Effects */
.effects-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.effect-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.effect-name {
    width: 140px;
    font-size: 0.95em;
    color: var(--color-text);
    text-decoration: none;
}

.effect-name:hover {
    color: var(--color-primary);
}

.effect-bar {
    flex: 1;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.effect-bar-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 6px;
    transition: width 0.3s;
}

.effect-percent {
    width: 45px;
    text-align: right;
    font-size: 0.85em;
    color: var(--color-text-light);
}

/* Lists */
.medical-list, .negative-list, .terpene-list, .lineage-list {
    margin: 0;
    padding-left: 20px;
}

.medical-list li, .negative-list li {
    margin-bottom: 5px;
}

.disclaimer-inline {
    font-size: 0.85em;
    color: var(--color-text-light);
    font-style: italic;
    margin-top: 15px;
}

.terpene-pct {
    color: var(--color-text-light);
    font-size: 0.9em;
    margin-left: 5px;
}

/* Strain Grid */
.strain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.strain-card {
    display: block;
    padding: 15px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--color-text);
    transition: border-color 0.2s;
}

.strain-card:hover {
    border-color: var(--color-primary);
    text-decoration: none;
}

.strain-card:visited {
    color: var(--color-text);
}

.strain-card h3 {
    margin: 0 0 8px;
    font-size: 1em;
    font-family: var(--font-sans);
    border: none;
    font-weight: 600;
}

.strain-card-stats {
    margin-top: 8px;
    font-size: 0.85em;
    color: var(--color-text-light);
}

.strain-card-thc {
    margin-top: 8px;
    font-size: 0.85em;
    color: var(--color-text-light);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--color-text);
    font-size: 0.95em;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--color-bg-secondary);
    text-decoration: none;
}

.btn:visited {
    color: var(--color-text);
}

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

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

.btn-primary:visited {
    color: white;
}

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

.btn-danger {
    background: var(--color-error);
    border-color: var(--color-error);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
}

.btn-full {
    width: 100%;
    text-align: center;
}

.suggest-edit-btn {
    font-size: 0.85em;
    padding: 5px 10px;
    background: transparent;
    border: 1px solid var(--color-border-light);
    color: var(--color-text-light);
    cursor: pointer;
    margin-top: 10px;
    text-decoration: none;
    display: inline-block;
}

.suggest-edit-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Disclaimer */
.disclaimer {
    font-size: 0.8em;
    line-height: 1.5;
    color: var(--color-text-light);
}

.disclaimer p {
    margin: 8px 0;
}

.disclaimer strong {
    color: var(--color-text);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: var(--radius-md);
    max-width: 450px;
    text-align: center;
}

.modal-content h2 {
    border: none;
    margin-top: 0;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

/* Loading */
.generating-page {
    text-align: center;
    padding: 100px 20px;
}

.generating-content {
    max-width: 500px;
    margin: 0 auto;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-border-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-details {
    margin-top: 15px;
    font-size: 0.9em;
    color: var(--color-error);
}

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

.pagination-link {
    padding: 8px 15px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--color-text);
}

.pagination-link:hover {
    background: var(--color-bg-secondary);
    text-decoration: none;
}

.pagination-info {
    padding: 8px 15px;
    color: var(--color-text-light);
}

/* Browse pages */
.browse-header {
    margin-bottom: 30px;
}

.browse-header h1 {
    margin-bottom: 10px;
}

.browse-header p {
    color: var(--color-text-light);
}

.browse-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--color-primary);
    text-decoration: none;
}

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

.filter-btn.active:visited {
    color: white;
}

/* Strain Table */
.strain-table-container {
    overflow-x: auto;
}

.strain-table {
    width: 100%;
    border-collapse: collapse;
}

.strain-table th,
.strain-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
}

.strain-table th {
    background: var(--color-bg-secondary);
    font-weight: 600;
}

.strain-table tr:hover {
    background: var(--color-bg-secondary);
}

/* Effects Page */
.effect-section {
    margin-bottom: 40px;
}

.effect-section h2 {
    border: none;
}

.effect-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.effect-card {
    display: block;
    padding: 20px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--color-text);
    transition: border-color 0.2s;
}

.effect-card:hover {
    border-color: var(--color-primary);
    text-decoration: none;
}

.effect-card:visited {
    color: var(--color-text);
}

.effect-card h3 {
    margin: 0 0 5px;
    border: none;
    font-size: 1em;
    font-family: var(--font-sans);
    font-weight: 600;
}

.effect-card p {
    margin: 0;
    font-size: 0.85em;
    color: var(--color-text-light);
}

.effect-icon {
    font-size: 1.5em;
    margin-right: 8px;
}

.effect-icon-large {
    font-size: 1.2em;
    margin-right: 10px;
}

.effect-positive { border-left: 3px solid var(--color-success); }
.effect-negative { border-left: 3px solid var(--color-error); }
.effect-medical { border-left: 3px solid var(--color-primary); }

.effect-category-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
    text-transform: capitalize;
}

.effect-positive { background: #dcfce7; color: #166534; }
.effect-negative { background: #fee2e2; color: #991b1b; }
.effect-medical { background: #dbeafe; color: #1e40af; }

/* Terpene Page */
.terpene-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.terpene-card {
    display: block;
    padding: 20px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--color-text);
    transition: border-color 0.2s;
}

.terpene-card:hover {
    border-color: var(--color-primary);
    text-decoration: none;
}

.terpene-card:visited {
    color: var(--color-text);
}

.terpene-card h3 {
    margin: 0 0 10px;
    border: none;
    font-family: var(--font-sans);
    font-weight: 600;
}

.terpene-aroma {
    font-size: 0.9em;
    margin-bottom: 8px;
}

.terpene-desc {
    font-size: 0.9em;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.terpene-also {
    font-size: 0.85em;
    color: var(--color-text-light);
    font-style: italic;
    margin: 0;
}

.terpene-article {
    max-width: var(--max-width);
}

.terpene-header {
    margin-bottom: 30px;
}

.terpene-aroma-header {
    color: var(--color-text-light);
    font-style: italic;
}

.terpene-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 40px;
}

.terpene-section {
    margin-bottom: 30px;
}

.terpene-effects-list {
    margin: 0;
    padding-left: 20px;
}

.also-found-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.also-found-list li {
    padding: 5px 0;
    border-bottom: 1px solid var(--color-border-light);
}

.also-found-list li:last-child {
    border-bottom: none;
}

/* Auth Pages */
.auth-page {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--color-bg-secondary);
    padding: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
}

.auth-card h1 {
    text-align: center;
    margin-top: 0;
    border: none;
}

.auth-form {
    margin-top: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1em;
}

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

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

.field-error {
    display: block;
    color: var(--color-error);
    font-size: 0.85em;
    margin-top: 5px;
}

.field-help {
    display: block;
    color: var(--color-text-light);
    font-size: 0.85em;
    margin-top: 5px;
}

.form-errors {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.form-errors .error {
    color: #991b1b;
    margin: 0;
}

.terms-notice {
    font-size: 0.85em;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border-light);
}

/* Profile Page */
.profile-page {
    max-width: 800px;
    margin: 0 auto;
}

.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-section {
    background: var(--color-bg-secondary);
    padding: 25px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
}

.profile-section h2 {
    margin-top: 0;
    font-size: 1.2em;
}

.section-desc {
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.profile-data {
    margin: 0;
}

.profile-data dt {
    font-weight: 600;
    color: var(--color-text-light);
    font-size: 0.9em;
    margin-top: 12px;
}

.profile-data dt:first-child {
    margin-top: 0;
}

.profile-data dd {
    margin: 0;
}

.api-keys-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.api-keys-table th,
.api-keys-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.9em;
}

.api-keys-table th {
    font-weight: 600;
    color: var(--color-text-light);
}

.api-key-display {
    font-size: 0.85em;
}

.create-key-form {
    display: flex;
    gap: 10px;
}

.create-key-form .form-input {
    flex: 1;
}

.inline-form {
    display: inline;
}

/* Suggestions Pages */
.suggest-edit-page {
    max-width: 800px;
    margin: 0 auto;
}

.edit-strain {
    color: var(--color-text-light);
    margin-bottom: 30px;
}

.edit-form {
    background: var(--color-bg-secondary);
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.edit-guidelines {
    margin-top: 30px;
    padding: 20px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-sm);
}

.edit-guidelines h3 {
    margin-top: 0;
    border: none;
    font-size: 1em;
}

.edit-guidelines ul {
    margin-bottom: 0;
}

.submission-success {
    text-align: center;
    max-width: 500px;
    margin: 40px auto;
    padding: 40px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
}

.success-icon {
    width: 60px;
    height: 60px;
    line-height: 60px;
    font-size: 30px;
    background: #dcfce7;
    color: var(--color-success);
    border-radius: 50%;
    margin: 0 auto 20px;
}

.submission-details {
    text-align: left;
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: var(--radius-sm);
}

.submission-details h3 {
    margin-top: 0;
    border: none;
    font-size: 1em;
}

.submission-details dl {
    margin: 0;
}

.submission-details dt {
    font-weight: 600;
    margin-top: 10px;
    color: var(--color-text-light);
    font-size: 0.9em;
}

.submission-details dt:first-child {
    margin-top: 0;
}

.submission-details dd {
    margin: 0;
}

.submission-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
    text-transform: capitalize;
}

.status-pending { background: #fef3c7; color: #b45309; }
.status-approved { background: #dcfce7; color: #166534; }
.status-rejected { background: #fee2e2; color: #991b1b; }

.suggestions-table {
    width: 100%;
    border-collapse: collapse;
}

.suggestions-table th,
.suggestions-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
}

.suggestions-table th {
    background: var(--color-bg-secondary);
    font-weight: 600;
}

.my-suggestions-page {
    max-width: 900px;
    margin: 0 auto;
}

/* Content Pages */
.content-page {
    max-width: 800px;
    margin: 0 auto;
}

.content-page section {
    margin-bottom: 30px;
}

.last-updated {
    color: var(--color-text-light);
    font-size: 0.9em;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--color-text-light);
}

/* Back Link */
.back-link {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border-light);
}

/* Similar Strains */
.similar-strains {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border-light);
}

.similar-strains h2 {
    border: none;
}

/* Result Count */
.result-count {
    color: var(--color-text-light);
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 900px) {
    .strain-layout,
    .terpene-layout {
        grid-template-columns: 1fr;
    }

    .strain-sidebar,
    .terpene-sidebar {
        order: -1;
    }

    .strain-infobox {
        float: none;
        margin: 0 auto 20px;
        max-width: 250px;
    }
}

@media (max-width: 768px) {
    .header-content {
        position: relative;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: -20px;
        right: -20px;
        background: var(--color-bg-secondary);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--color-border-light);
        gap: 10px;
    }

    .main-nav.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .home-title {
        font-size: 2.5em;
    }

    .search-wrapper {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }

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

    .strain-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .effect-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .form-actions,
    .submission-actions,
    .create-key-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header-actions {
        display: none;
    }

    .home-hero {
        padding: 50px 15px;
    }

    .home-title {
        font-size: 2em;
    }

    .auth-card {
        padding: 25px;
    }
}
