/* Primal Fathers Shadow Assessment - Styles */

:root {
    --primary: #472918;
    --accent: #E4BC70;
    --text: #F5F0E8;
    --text-light: #C9AD7C;
    --bg: #1a1410;
    --card-bg: #2a1f18;
    --chapter-bg: #1f1814;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

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

/* Header */
.header {
    text-align: center;
    padding: 40px 20px;
}

.header h1 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 5px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header .subtitle {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 400;
}

/* Progress Bar */
.progress-text {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.progress-bar {
    height: 8px;
    background: var(--chapter-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, #D4A852 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Questions */
.question-container {
    min-height: 300px;
}

.question {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
}

.question h3 {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: var(--text);
    line-height: 1.5;
}

/* Section Indicator */
.section-indicator {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: white;
}

.section-indicator.father { background: #8B6914; }
.section-indicator.guardian { background: #6B4423; }
.section-indicator.alchemist { background: #4A5568; }
.section-indicator.devoted { background: #744210; }

/* Options */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    display: flex;
    align-items: flex-start;
    padding: 15px 20px;
    background: var(--chapter-bg);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option:hover {
    border-color: var(--accent);
    background: rgba(228, 188, 112, 0.05);
}

.option.selected {
    border-color: var(--accent);
    background: rgba(228, 188, 112, 0.1);
}

.option-radio {
    width: 22px;
    height: 22px;
    border: 2px solid var(--text-light);
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
}

.option.selected .option-radio {
    border-color: var(--accent);
}

.option.selected .option-radio::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.option-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text);
}

/* Rating Options */
.rating-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rating-option {
    flex: 1;
    min-width: 100px;
    padding: 15px 20px;
    border: 2px solid var(--chapter-bg);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    background: var(--chapter-bg);
    color: var(--text);
}

.rating-option:hover {
    border-color: var(--accent);
    background: rgba(228, 188, 112, 0.05);
}

.rating-option.selected {
    border-color: var(--accent);
    background: rgba(228, 188, 112, 0.15);
}

/* Navigation */
.nav-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-nav {
    flex: 1;
    max-width: 150px;
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-back {
    background: var(--chapter-bg);
    color: var(--text-light);
}

.btn-back:hover:not(:disabled) {
    background: var(--card-bg);
}

.btn-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 15px 30px;
    background: var(--accent);
    color: var(--primary);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary:hover {
    background: #D4A852;
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-secondary:hover {
    background: rgba(228, 188, 112, 0.1);
}

/* Results Page Styles */
.results-container {
    padding: 20px 0;
}

.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--chapter-bg);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.hidden {
    display: none !important;
}

/* Integration Score */
.integration-score {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, var(--chapter-bg) 0%, var(--card-bg) 100%);
    border-radius: 16px;
    margin-bottom: 30px;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) var(--score-percent), var(--chapter-bg) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: var(--card-bg);
    border-radius: 50%;
}

.score-value {
    position: relative;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
}

.integration-score h2 {
    margin-bottom: 5px;
    color: var(--text);
}

.integration-score p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Archetype Grid */
.archetype-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

@media (max-width: 600px) {
    .archetype-grid {
        grid-template-columns: 1fr;
    }
    .rating-options {
        flex-direction: column;
    }
    .rating-option {
        min-width: auto;
    }
}

.archetype-card {
    padding: 20px;
    border-radius: 12px;
    background: var(--card-bg);
    border-left: 4px solid;
}

.archetype-card.father { border-color: #8B6914; }
.archetype-card.guardian { border-color: #6B4423; }
.archetype-card.alchemist { border-color: #4A5568; }
.archetype-card.devoted { border-color: #744210; }

.archetype-card h4 {
    margin-bottom: 5px;
}

.archetype-card .percentage {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin: 10px 0;
}

.archetype-bar {
    height: 8px;
    background: var(--chapter-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.archetype-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.archetype-card.father .archetype-bar-fill { background: #8B6914; }
.archetype-card.guardian .archetype-bar-fill { background: #6B4423; }
.archetype-card.alchemist .archetype-bar-fill { background: #4A5568; }
.archetype-card.devoted .archetype-bar-fill { background: #744210; }

.shadow-tendency {
    font-size: 0.8rem;
    color: var(--text-light);
}

.shadow-tendency.active { color: #c53030; }
.shadow-tendency.passive { color: #2b6cb0; }
.shadow-tendency.balanced { color: #38a169; }

/* Chart Section */
.chart-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.chart-section h4 {
    margin-bottom: 20px;
    text-align: center;
}

.chart-container {
    max-width: 400px;
    margin: 0 auto;
}

/* Shadow Profile */
.shadow-profile {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.shadow-profile h3 {
    margin-bottom: 20px;
    color: var(--accent);
}

.shadow-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shadow-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--chapter-bg);
    border-radius: 8px;
}

.shadow-rank {
    width: 30px;
    height: 30px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.shadow-info {
    flex: 1;
}

.shadow-info h5 {
    margin-bottom: 3px;
    color: var(--text);
}

.shadow-info small {
    color: var(--text-light);
    font-size: 0.8rem;
}

.shadow-count {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.2rem;
}

/* Archetype Details */
.archetype-detail {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.archetype-detail.father { border-color: #8B6914; }
.archetype-detail.guardian { border-color: #6B4423; }
.archetype-detail.alchemist { border-color: #4A5568; }
.archetype-detail.devoted { border-color: #744210; }

.archetype-detail h4 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.archetype-detail .badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.strongest { background: #38a169; color: white; }
.badge.weakest { background: #c53030; color: white; }

.archetype-detail p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.6;
}

.divine-qualities {
    margin-bottom: 15px;
}

.divine-qualities h5 {
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.divine-qualities ul {
    list-style: none;
    padding: 0;
}

.divine-qualities li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-light);
    font-size: 0.9rem;
}

.divine-qualities li::before {
    content: "+";
    position: absolute;
    left: 0;
    color: #38a169;
    font-weight: 700;
}

.shadow-detail {
    background: var(--chapter-bg);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.shadow-detail h5 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.shadow-detail h5 span.type {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
}

.shadow-detail h5 span.active { background: rgba(197, 48, 48, 0.2); color: #c53030; }
.shadow-detail h5 span.passive { background: rgba(43, 108, 176, 0.2); color: #2b6cb0; }

.shadow-detail p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* Actions */
.results-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
}

.results-actions .btn-secondary {
    flex: 1;
    min-width: 140px;
    max-width: 200px;
}

.section-divider {
    border: none;
    height: 1px;
    background: var(--chapter-bg);
    margin: 30px 0;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 600px) {
    .header h1 {
        font-size: 1.5rem;
    }
}
