:root {
    --primary-color: #1A237E;
    /* Deep Navy */
    --accent-color: #009688;
    /* Teal Green */
    --accent-light: #4DB6AC;
    --accent-gold: #FFC107;
    /* Amber Gold */
    --bg-color: #F5F5F5;
    --text-color: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes coatingEffect {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(0, 150, 136, 0.7);
    }

    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 20px 10px rgba(0, 150, 136, 0);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.app-header {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-container {
    width: 200px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--accent-color), var(--accent-light));
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-color);
    min-width: 70px;
    text-align: right;
}

/* Main Layout */
#main-container {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.screen {
    display: none;
    width: 100%;
    max-width: 1000px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.screen.active {
    display: block;
    opacity: 1;
}

/* Intro Screen */
.intro-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.intro-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.feature-item i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

/* User Info Form */
.user-form {
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--primary-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-light);
    outline: none;
    box-shadow: 0 0 0 3px rgba(77, 182, 172, 0.2);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* Buttons */
button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(26, 35, 126, 0.3);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(26, 35, 126, 0.4);
    background: #232ea0;
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    border: 1px solid #ccc;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #f0f0f0;
    color: var(--text-color);
}

.micro-text {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #999;
}

/* Diagnosis Screen */
.diagnosis-header {
    text-align: center;
    margin-bottom: 3rem;
}

.diagnosis-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.question-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
    animation: slideIn 0.5s ease forwards;
}

.q-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.q-options {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.option-btn {
    flex: 1;
    padding: 0.8rem 0;
    background: #f5f5f5;
    border-radius: 8px;
    font-weight: 500;
    color: var(--text-light);
    transition: var(--transition);
    text-align: center;
}

.option-btn:hover {
    background: #e0f2f1;
    color: var(--accent-color);
}

.option-btn.selected {
    background: var(--accent-color);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(0, 150, 136, 0.3);
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Dashboard */
.dashboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.user-type-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Result Cards Standardization */
.card {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f2f5;
}

.card h3 i {
    color: var(--accent-color);
    font-size: 1.4rem;
}

.score-card {
    text-align: center;
    grid-column: span 1;
}

.gauge-chart-container {
    position: relative;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.score-display {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#total-score {
    font-size: 4.8rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    letter-spacing: -2px;
}

.max-score {
    font-size: 1.4rem;
    color: var(--text-light);
    font-weight: 600;
    margin-top: 0.2rem;
}

.score-message {
    margin-top: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 12px;
    display: inline-block;
}

.radar-card {
    grid-column: span 1;
}

.radar-chart-container {
    width: 100%;
    max-width: 500px;
    height: 380px;
    margin: 0 auto;
    position: relative;
}

.pillar-card {
    grid-column: span 2;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.pillar-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.pillar-item {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.pillar-item:hover {
    border-color: var(--accent-light);
    transform: translateY(-3px);
}

.pillar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.05rem;
}

.pillar-header i {
    color: var(--accent-color);
    margin-right: 5px;
}

.progress-bg {
    background: #eaedf0;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-light), var(--accent-color));
    border-radius: 6px;
}

.pillar-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.prescription-card {
    grid-column: span 2;
    border-left: 6px solid var(--primary-color);
}

.extra-prescription-card {
    grid-column: span 2;
    border-left: 6px solid var(--accent-color);
    background: linear-gradient(to right, #ffffff, #f0f7f7);
}

.alert-box {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.5rem;
}

.alert-box strong {
    display: block;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.alert-box p {
    color: #4a5568;
    line-height: 1.8;
}

.extra-info-text {
    margin-top: 1.2rem;
    font-size: 0.9rem;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 8px;
    font-style: normal;
}

.extra-info-text i {
    color: var(--accent-color);
}

.actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    margin-top: 1rem;
}

.actions button {
    background: #f0f2f5 !important;
    color: var(--text-light) !important;
    border: 1px solid #e0e4e9 !important;
    box-shadow: none !important;
    font-size: 0.95rem !important;
    padding: 0.8rem 1.5rem !important;
}

.actions button:hover {
    background: #e4e7eb !important;
    transform: none !important;
}

.actions button i {
    color: var(--accent-color);
    margin-right: 8px;
    font-size: 1rem;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

/* Floating Program Button */
.floating-cta {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    z-index: 9999;
    /* Ensure it's on top */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: bounce 2s infinite;
}

.floating-cta i {
    font-size: 1.2rem;
    color: #fff;
    /* Ensure icon is white */
}

.floating-cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading */
.loading-content {
    text-align: center;
}

.blueprint-loader {
    width: 60px;
    height: 60px;
    margin: 0 auto 2rem;
    position: relative;
}

.line {
    position: absolute;
    background: var(--accent-color);
    opacity: 0.6;
}

.line-1 {
    width: 100%;
    height: 4px;
    top: 0;
    left: 0;
    animation: drawH 2s infinite;
}

.line-2 {
    width: 4px;
    height: 100%;
    top: 0;
    right: 0;
    animation: drawV 2s infinite 0.5s;
}

.line-3 {
    width: 100%;
    height: 4px;
    bottom: 0;
    left: 0;
    animation: drawH 2s infinite 1s;
}

@keyframes drawH {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

@keyframes drawV {
    0% {
        height: 0;
    }

    100% {
        height: 100%;
    }
}

/* Scale Legend */
.scale-legend {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    background: #e6fcf5;
    /* Lighter teal */
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    flex-wrap: wrap;
}

.scale-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
}

.scale-item .num {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    background-color: var(--accent-light);
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive */
@media (max-width: 960px) {
    .app-header {
        padding: 0.8rem 1rem;
    }

    .logo {
        font-size: 1rem;
    }

    .progress-container {
        width: 80px;
    }

    .progress-text {
        font-size: 0.75rem;
        min-width: 50px;
    }

    #main-container {
        margin-top: 60px;
        padding: 1rem;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .screen {
        max-width: 100%;
    }

    .intro-content h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .features {
        gap: 1rem;
    }

    .feature-item {
        font-size: 0.85rem;
    }

    .feature-item i {
        font-size: 1.5rem;
    }

    .user-form {
        padding: 1.5rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .btn-primary {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    .diagnosis-header h2 {
        font-size: 1.5rem;
    }

    .q-options {
        gap: 0.3rem;
    }

    .option-btn {
        padding: 0.6rem 0;
        font-size: 0.9rem;
    }

    .card {
        padding: 1.5rem;
    }

    .card h3 {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .dashboard-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem;
    }

    .card {
        padding: 1.5rem;
        width: 100% !important;
        min-width: 0;
    }

    .score-card,
    .radar-card,
    .pillar-card,
    .prescription-card,
    .extra-prescription-card,
    .blueprint-card {
        grid-column: auto !important;
        width: 100% !important;
    }

    #total-score {
        font-size: 3rem;
    }

    .gauge-chart-container {
        height: auto;
        min-height: 220px;
    }

    .score-display {
        bottom: 25px;
    }

    #total-score {
        font-size: 3.8rem;
    }

    .max-score {
        font-size: 1.1rem;
    }

    .radar-chart-container {
        height: 300px;
    }

    .pillar-list {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .alert-box {
        padding: 1.2rem;
    }

    .alert-box strong {
        font-size: 1rem;
    }

    .alert-box p {
        font-size: 0.9rem;
    }

    .floating-cta {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        text-align: center;
        justify-content: center;
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }
}

@media (max-width: 480px) {
    .intro-content h1 {
        font-size: 1.8rem;
    }

    .q-options {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
    }

    .option-btn {
        padding: 10px 0;
    }

    .scale-legend {
        padding: 0.6rem 1rem;
        gap: 0.5rem;
    }

    .scale-item {
        font-size: 0.75rem;
    }
}