/* Pythagorean Numerology Calculator Styles */

:root {
    --primary: #4a5568;
    --primary-dark: #2d3748;
    --accent: #667eea;
    --accent-light: #7c8ce8;
    --master: #f6ad55;
    --master-dark: #dd9a47;
    --bg: #f7fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --text: #2d3748;
    --text-muted: #718096;
    --success: #48bb78;
    --error: #f56565;
    --error-bg: #fff5f5;
}

* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
    line-height: 1.6;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 12px;
}

header h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
}

header .subtitle {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Form Styles */
.calculator-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--accent);
}

/* Settings Panel */
.settings-panel {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.settings-panel legend {
    font-weight: 600;
    padding: 0 0.5rem;
    color: var(--primary-dark);
}

/* Buttons */
.btn-calculate {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
}

.btn-calculate:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-calculate:active {
    transform: translateY(0);
}

/* HTMX Loading Indicator */
.htmx-indicator {
    display: none;
}

.htmx-request .btn-text {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline;
}

/* Errors */
.errors {
    background: var(--error-bg);
    border: 1px solid var(--error);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.errors h4 {
    margin: 0 0 0.5rem 0;
    color: var(--error);
}

.errors ul {
    margin: 0;
    padding-left: 1.25rem;
}

.errors li {
    color: var(--error);
}

/* Results Section */
.results {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.results h2 {
    margin: 0 0 1rem 0;
    color: var(--primary-dark);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

.result-header {
    background: var(--bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.result-header p {
    margin: 0.25rem 0;
}

.export-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-export {
    padding: 0.6rem 1.25rem;
    border: 2px solid var(--accent);
    border-radius: 6px;
    background: white;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Section Headers */
.results h3 {
    margin: 2rem 0 1rem 0;
    color: var(--primary-dark);
    font-size: 1.25rem;
}

.section-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Number Cards Grid */
.numbers-grid,
.cycles-grid,
.timeline-grid {
    display: grid;
    gap: 1rem;
}

.numbers-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.cycles-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.timeline-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Number Card */
.number-card,
.cycle-card,
.pinnacle-card,
.challenge-card {
    background: var(--bg);
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    transition: box-shadow 0.2s;
}

.number-card:hover,
.cycle-card:hover,
.pinnacle-card:hover,
.challenge-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.number-card h4,
.cycle-card h5,
.pinnacle-card h5,
.challenge-card h5 {
    margin: 0 0 0.75rem 0;
    color: var(--primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.number-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.master-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--master) 0%, var(--master-dark) 100%);
    color: white;
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timing {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.5rem 0;
}

/* Number Meaning Styles */
.number-meaning {
    margin: 0.75rem 0;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border-left: 3px solid var(--accent);
}

.number-meaning.compact {
    padding: 0.5rem 0.75rem;
    margin: 0.5rem 0;
}

.number-meaning.challenge {
    border-left-color: var(--master);
}

.meaning-title {
    font-weight: 600;
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.number-meaning.challenge .meaning-title {
    color: var(--master-dark);
}

.keywords {
    font-size: 0.8rem;
}

.keywords-positive,
.keywords-all-positive,
.keywords-negative {
    margin-bottom: 0.5rem;
}

.keyword-label {
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 0.35rem;
}

.keyword-list {
    color: var(--text);
    line-height: 1.5;
}

.keywords-negative .keyword-label {
    color: var(--master-dark);
}

.keywords-negative .keyword-list {
    color: var(--text-muted);
}

.keywords-compact {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.keywords-details {
    margin-top: 0.5rem;
}

.keywords-details summary {
    cursor: pointer;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 500;
}

.keywords-details summary:hover {
    text-decoration: underline;
}

.keywords-section {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 4px;
}

/* Calculation Details */
.calculation-details {
    margin-top: 1rem;
}

.calculation-details summary {
    cursor: pointer;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
}

.calculation-details summary:hover {
    text-decoration: underline;
}

.calculation-steps {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-left: 1.25rem;
    margin: 0.75rem 0 0 0;
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.calculation-steps li {
    margin-bottom: 0.35rem;
    font-family: 'SF Mono', SFMono-Regular, Consolas, monospace;
}

/* Settings Used */
.settings-used {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.settings-used h4 {
    margin: 0 0 0.75rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.settings-used ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.settings-used li {
    margin-bottom: 0.25rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer p {
    margin: 0.25rem 0;
}

/* Print Styles */
@media print {
    body {
        background: white;
        max-width: none;
        padding: 0;
    }

    header {
        background: none;
        color: var(--text);
        border: none;
        padding: 0;
        margin-bottom: 1rem;
    }

    .calculator-form {
        display: none;
    }

    .no-print {
        display: none !important;
    }

    .results {
        box-shadow: none;
        padding: 0;
        margin: 0;
    }

    .number-card,
    .cycle-card,
    .pinnacle-card,
    .challenge-card {
        break-inside: avoid;
        border: 1px solid #ddd;
    }

    .calculation-details[open] {
        break-inside: avoid;
    }

    footer {
        display: none;
    }
}

/* Navigation */
.calculator-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.nav-link {
    padding: 0.5rem 1rem;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

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

.nav-link.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Form description */
.form-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Personal Cycles Grid */
.personal-cycles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.personal-cycle-card {
    background: var(--bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--border);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.personal-cycle-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.personal-cycle-card.year {
    border-left: 4px solid var(--accent);
}

.personal-cycle-card.month {
    border-left: 4px solid var(--success);
}

.personal-cycle-card.day {
    border-left: 4px solid var(--master);
}

.personal-cycle-card h4 {
    margin: 0 0 0.75rem 0;
    color: var(--primary);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.personal-cycle-card .number-value {
    font-size: 2.5rem;
}

/* Cycles Explanation Section */
.cycles-explanation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg);
    border-radius: 12px;
}

.cycles-explanation h3 {
    margin: 0 0 1rem 0;
    color: var(--primary-dark);
}

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

.explanation-card {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.explanation-card h4 {
    margin: 0 0 0.5rem 0;
    color: var(--accent);
    font-size: 0.9rem;
}

.explanation-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 0.5rem;
    }

    header {
        padding: 1rem;
        border-radius: 8px;
    }

    header h1 {
        font-size: 1.4rem;
    }

    .calculator-form,
    .results {
        padding: 1.25rem;
    }

    .numbers-grid,
    .cycles-grid,
    .timeline-grid {
        grid-template-columns: 1fr;
    }

    .export-buttons {
        flex-direction: column;
    }

    .number-value {
        font-size: 1.75rem;
    }
}
