/* Questionnaire Styles */
.questionnaire-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem 0;
}

.progress-custom {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-custom .progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

.question-card {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-title {
    color: #375a7f;
    font-size: 1.75rem;
    line-height: 1.3;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.option-tile {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 80px;
}

.option-tile:hover {
    border-color: #375a7f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(55, 90, 127, 0.15);
}

.option-tile.selected {
    border-color: #375a7f;
    background: linear-gradient(135deg, #375a7f 0%, #3498db 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(55, 90, 127, 0.3);
}

.option-letter {
    background: #375a7f;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.option-tile.selected .option-letter {
    background: white;
    color: #375a7f;
}

.option-text {
    font-size: 1.1rem;
    font-weight: 500;
    flex-grow: 1;
}

.option-check {
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #00bc8c;
    font-size: 1.5rem;
}

.option-tile.selected .option-check {
    opacity: 1;
    color: white;
}

.navigation-buttons {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.next-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Results Page Styles */
.results-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem 0;
}

.results-header .success-icon {
    font-size: 4rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Loading State */
.loading-state {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Immediate Actions Section */
.immediate-actions-card {
    margin-bottom: 2rem;
}

.action-priority {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 4px solid #375a7f;
}

.priority-number {
    background: #375a7f;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* Key Insights Section */
.insights-section {
    margin: 3rem 0;
}

.insight-card {
    height: 100%;
}

.insight-card .card {
    transition: transform 0.3s ease;
}

.insight-card .card:hover {
    transform: translateY(-5px);
}

/* Mind Map Styles */
.mind-map-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.mind-map {
    position: relative;
    width: 100%;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.center-node {
    position: absolute;
    z-index: 10;
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #375a7f 0%, #3498db 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 8px 25px rgba(55, 90, 127, 0.3);
    animation: pulse 2s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.center-node .node-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
}

.center-node i {
    font-size: 2rem;
}

.branch-node {
    position: absolute;
    width: 140px;
    height: 140px;
    transform-origin: center;
    animation: fadeInScale 0.6s ease-out forwards;
    animation-delay: calc(var(--delay, 0) * 0.1s);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.branch-node {
    left: 50%;
    top: 50%;
    margin-left: -70px;
    margin-top: -70px;
    transform: translate(
        calc(cos(var(--angle)) * 220px),
        calc(sin(var(--angle)) * 220px)
    );
}

.branch-node .node-content {
    width: 100%;
    height: 100%;
    background: var(--color);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 1rem;
    font-size: 0.9rem;
    line-height: 1.2;
    position: relative;
}

.branch-node .node-content:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.priority-star {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.8rem;
    color: #ffd700;
}

.expand-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sub-nodes {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 1rem;
    z-index: 20;
}

.sub-node {
    background: white;
    border: 2px solid var(--color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sub-node:hover {
    background: var(--color);
    color: white;
    transform: translateX(5px);
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.action-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.action-card:hover {
    background: white;
    border-color: #375a7f;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(55, 90, 127, 0.15);
}

.action-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.action-card h5 {
    color: #375a7f;
    margin-bottom: 0.5rem;
}

/* Step Cards for How It Works */
.step-card {
    padding: 2rem 1rem;
}

.step-number .badge {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Strategy Cards */
.strategy-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    overflow: hidden;
}

.strategy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #375a7f;
}

.strategy-card .card-body {
    padding: 2rem 1.5rem;
}

/* AI-Generated Content Badges */
.badge {
    font-size: 0.85em;
    padding: 0.5rem 1rem;
}

/* 3-Level Mind Map Styles */
.three-level-mindmap {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.level1-topic {
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.topic-header {
    padding: 1.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.topic-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.topic-icon, .subtopic-icon {
    transition: transform 0.3s ease;
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

.level2-container {
    background: #f8f9fa;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.level2-subtopic {
    border-bottom: 1px solid #e9ecef;
}

.level2-subtopic:last-child {
    border-bottom: none;
}

.subtopic-header {
    padding: 1.25rem 1.5rem;
    background: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.3s ease;
    user-select: none;
}

.subtopic-header:hover {
    background: #e9ecef;
}

.subtopic-header h5 {
    color: #375a7f;
    font-weight: 600;
}

.level3-container {
    background: white;
    padding: 1rem 1.5rem 1.5rem 3rem;
    border-top: 1px solid #e9ecef;
}

.level3-advice {
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid #375a7f;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.level3-advice:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(55, 90, 127, 0.15);
}

.level3-advice i {
    font-size: 0.9rem;
}

/* Animation for expanding sections */
.level2-container, .level3-container {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
        padding-top: inherit;
        padding-bottom: inherit;
    }
}

/* Responsive adjustments for 3-level mind map */
@media (max-width: 768px) {
    .three-level-mindmap {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .topic-header {
        padding: 1rem;
    }
    
    .topic-header h4 {
        font-size: 1.1rem;
    }
    
    .subtopic-header {
        padding: 1rem;
    }
    
    .subtopic-header h5 {
        font-size: 1rem;
    }
    
    .level3-container {
        padding: 1rem 1rem 1rem 2rem;
    }
    
    .level3-advice {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .mind-map {
        height: 400px;
    }
    
    .branch-node {
        width: 80px;
        height: 80px;
        margin-left: -40px;
        margin-top: -40px;
        transform: translate(
            calc(cos(var(--angle)) * 120px),
            calc(sin(var(--angle)) * 120px)
        );
    }
    
    .center-node {
        width: 120px;
        height: 120px;
        font-size: 0.9rem;
    }
    
    .immediate-actions-card .row {
        flex-direction: column;
    }
}

/* Processing Overlay Styles */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.processing-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.processing-animation {
    margin-bottom: 2rem;
}

.processing-title {
    color: #375a7f;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.processing-message {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.processing-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: left;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: #f8f9fa;
    color: #6c757d;
    transition: all 0.8s ease;
    border-left: 4px solid #e9ecef;
    opacity: 0.7;
}

.step-item.active {
    background: linear-gradient(135deg, #375a7f 0%, #3498db 100%);
    color: white;
    border-left-color: #00bc8c;
    transform: translateX(10px);
    box-shadow: 0 4px 15px rgba(55, 90, 127, 0.3);
    opacity: 1;
    animation: stepActivate 0.6s ease-out;
}

@keyframes stepActivate {
    0% {
        opacity: 0.7;
        transform: translateX(0) scale(0.95);
    }
    50% {
        transform: translateX(5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateX(10px) scale(1);
    }
}

.step-item i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.step-item.active i {
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.processing-note {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #f39c12;
}

.processing-note small {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.processing-note small::before {
    content: "\f071";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #f39c12;
}

/* Responsive adjustments for processing overlay */
@media (max-width: 768px) {
    .processing-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .processing-title {
        font-size: 1.5rem;
    }
    
    .processing-message {
        font-size: 1rem;
    }
    
    .processing-steps {
        gap: 0.75rem;
    }
    
    .step-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .step-item i {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .processing-content {
        padding: 1.5rem 1rem;
        border-radius: 15px;
    }
    
    .processing-title {
        font-size: 1.25rem;
    }
    
    .spinner-border {
        width: 3rem !important;
        height: 3rem !important;
    }
}