/*
 * Matrix of Destiny Theme
 * Clean, calm reference style compliant with docs/design-system.md.
 */
:root {
    --c-accent: #4f46e5;
    --c-accent-hover: #4338ca;
    --c-link: #4f46e5;
    --c-gold: #d97706;
    --c-purple: #7c3aed;
    --c-blue: #2563eb;
    --c-red: #dc2626;
    --radius-matrix: 14px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --c-accent: #818cf8;
        --c-accent-hover: #a5b4fc;
        --c-link: #818cf8;
        --c-gold: #fbbf24;
        --c-purple: #c084fc;
        --c-blue: #60a5fa;
        --c-red: #f87171;
    }
}

/* Calculator Form Box */
.calc-card-box {
    background: var(--c-surface, #fff);
    border: 1px solid var(--c-border, #e5e7eb);
    border-radius: var(--radius-matrix);
    padding: 1.75rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.date-inputs-row {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.25rem 0 1.5rem;
}

.input-date-item {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.input-date-item label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-text-muted);
    margin-bottom: 0.35rem;
}

.input-date-field {
    min-height: 48px;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--c-border, #e5e7eb);
    font-size: 1.1rem;
    width: 90px;
    text-align: center;
}

.input-date-field.field-year {
    width: 120px;
}

.btn-calculate {
    min-height: 50px;
    padding: 0.75rem 2.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 10px;
    background: var(--c-accent);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.btn-calculate:hover {
    background: var(--c-accent-hover);
}

.btn-calculate:active {
    transform: scale(0.98);
}

/* Octagram SVG Container */
.matrix-visualizer-box {
    max-width: 440px;
    margin: 0 auto 2.5rem;
    position: relative;
    text-align: center;
}

.matrix-star-svg {
    max-width: 380px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.node-circle {
    transition: transform 0.2s ease, stroke-width 0.2s ease;
}

.matrix-node:hover .node-circle {
    stroke-width: 4px;
}

.visualizer-hint {
    font-size: 0.85rem;
    color: var(--c-text-muted);
    margin-top: 0.5rem;
}

/* Interpretation Sections */
.sections-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.point-detail-card {
    background: var(--c-surface, #fff);
    border: 1px solid var(--c-border, #e5e7eb);
    border-radius: var(--radius-matrix);
    padding: 1.5rem;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.point-detail-card.highlight-pulse {
    animation: pulseBorder 1.2s ease;
}

@keyframes pulseBorder {
    0% { border-color: var(--c-accent); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.25); }
    100% { border-color: var(--c-border); box-shadow: none; }
}

.point-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--c-border, #f3f4f6);
    padding-bottom: 0.75rem;
}

.point-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.point-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.badge-purple { background: var(--c-purple); }
.badge-blue { background: var(--c-blue); }
.badge-gold { background: var(--c-gold); }
.badge-red { background: var(--c-red); }
.badge-accent { background: var(--c-accent); }

.detail-block-row {
    margin: 0.85rem 0;
    line-height: 1.55;
    font-size: 0.98rem;
}

.detail-label {
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 0.2rem;
}

.plus-text {
    color: var(--c-text);
    background: rgba(5, 150, 105, 0.05);
    padding: 0.75rem 1rem;
    border-left: 3px solid #059669;
    border-radius: 0 8px 8px 0;
    margin-top: 0.25rem;
}

.minus-text {
    color: var(--c-text);
    background: rgba(220, 38, 38, 0.05);
    padding: 0.75rem 1rem;
    border-left: 3px solid #dc2626;
    border-radius: 0 8px 8px 0;
    margin-top: 0.25rem;
}

/* Compatibility Meter */
.compat-meter-box {
    text-align: center;
    background: var(--c-surface, #fff);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-matrix);
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.compat-score-digits {
    font-size: 4rem;
    font-weight: 900;
    color: var(--c-accent);
    line-height: 1;
    margin: 0.5rem 0;
}

/* Arcana Grid on Index */
.arcana-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.arcan-card-link {
    background: var(--c-surface, #fff);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-matrix);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.arcan-card-link:hover {
    border-color: var(--c-accent);
    transform: translateY(-2px);
}

.arcan-number-badge {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--c-accent);
    margin-bottom: 0.25rem;
}
