:root {
    --primary-blue: #1D70B8;
    --dark-blue: #0A4F9E;
    --medical-green: #3BAF7F;
    --alert-red: #C0392B;
    --text-dark: #2c3e50;
    --text-gray: #5a6b7c;
    --bg-light: #f4f7f9;
    --white: #ffffff;
    --border-color: #e1e8ed;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 25px rgba(29, 112, 184, 0.15);
    --radius-card: 12px;
    --radius-btn: 6px;
    --font-main: 'Inter', sans-serif;
    --font-head: 'Roboto', sans-serif;
}

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

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: var(--font-main);
    line-height: 1.6;
    font-size: 16px;
}

/* --- HEADER --- */
.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.medical-icon {
    background: var(--primary-blue);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.brand-name {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--dark-blue);
    letter-spacing: 0.5px;
}

.secure-badge {
    font-size: 0.85rem;
    color: var(--medical-green);
    background: rgba(59, 175, 127, 0.1);
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* --- LAYOUT --- */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.narrow-container {
    max-width: 700px;
}

.view {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding-bottom: 60px;
}

.view.active {
    display: block;
    opacity: 1;
}

/* --- CARDS & PAPER --- */
.medical-paper {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    padding: 40px;
    margin-top: 20px;
    border: 1px solid var(--border-color);
}

.paper-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 15px;
    margin-bottom: 30px;
    font-size: 0.8rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- HERO SECTION --- */
.hero-section {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    align-items: center;
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex: 1;
    position: relative;
}

.img-responsive {
    width: 100%;
    height: auto;
    display: block;
}

.rounded-shadow {
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
}

.caption {
    font-size: 0.75rem;
    color: var(--text-gray);
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

.headline {
    font-family: var(--font-head);
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

.text-blue {
    color: var(--primary-blue);
}

.sub-headline {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.check-icon {
    color: var(--medical-green);
    font-weight: bold;
}

/* --- INFO BOXES --- */
.info-box {
    padding: 20px;
    border-radius: var(--radius-btn);
    margin-bottom: 20px;
    border-left: 4px solid transparent;
}

.blue-box {
    background: #eef6fc;
    border-left-color: var(--primary-blue);
}

.red-box {
    background: #fcf2f2;
    border-left-color: var(--alert-red);
}

.info-box h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.info-box p {
    font-size: 0.95rem;
    color: var(--text-gray);
}

/* --- BUTTONS --- */
.cta-area {
    text-align: center;
    margin-top: 40px;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(29, 112, 184, 0.3);
    width: 100%;
    max-width: 400px;
}

.btn-primary:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-large {
    padding: 20px 40px;
    font-size: 1.2rem;
}

.secure-text {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* --- QUIZ STYLES --- */
.progress-section {
    margin-bottom: 30px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-gray);
}

.progress-bar-bg {
    background: #e1e8ed;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    background: var(--primary-blue);
    height: 100%;
    width: 0%;
    transition: width 0.4s ease;
}

.question-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.question-title {
    font-family: var(--font-head);
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    font-weight: 600;
}

.options-grid {
    display: grid;
    gap: 15px;
}

.option-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-btn);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.option-card:hover {
    border-color: #b0c4de;
    background: #f8fbff;
}

.option-card.selected {
    border-color: var(--primary-blue);
    background: #eef6fc;
    box-shadow: 0 0 0 3px rgba(29, 112, 184, 0.1);
}

.option-icon {
    font-size: 1.5rem;
    background: #f0f4f8;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-text {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* --- PROCESSING --- */
.centered-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.spinner {
    animation: rotate 2s linear infinite;
    width: 60px;
    height: 60px;
}

.spinner .path {
    stroke: var(--primary-blue);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.processing-title {
    margin-top: 20px;
    color: var(--text-dark);
    font-family: var(--font-head);
}

.processing-steps {
    margin-top: 30px;
    text-align: left;
    width: 100%;
    max-width: 300px;
}

.step {
    padding: 10px;
    border-bottom: 1px solid #eee;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.step.completed {
    color: var(--medical-green);
    font-weight: 600;
}

.step.active {
    color: var(--primary-blue);
    font-weight: 600;
}

/* --- REPORT --- */
.report-paper {
    max-width: 800px;
    margin: 0 auto;
}

.report-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-blue);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.report-logo {
    font-weight: 800;
    color: var(--dark-blue);
    font-size: 1.2rem;
}

.report-title {
    font-size: 0.9rem;
    color: var(--text-gray);
    letter-spacing: 1px;
}

.patient-info {
    display: flex;
    justify-content: space-between;
    background: var(--bg-light);
    padding: 15px;
    border-radius: var(--radius-btn);
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.status-tag {
    font-weight: bold;
    color: var(--alert-red);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.results-table th,
.results-table td {
    padding: 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.results-table th {
    background: #f8f9fa;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.9rem;
}

.value-high {
    font-weight: bold;
    color: var(--text-dark);
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-critical {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.interpretation-box {
    margin-bottom: 30px;
}

.interpretation-box h4,
.risk-summary h4,
.next-steps h4 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.risk-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.risk-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.risk-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.risk-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.risk-level {
    font-size: 0.85rem;
    font-weight: bold;
}

.level-high {
    color: var(--alert-red);
}

.level-med {
    color: #d97706;
}

.next-steps {
    background: #eef6fc;
    padding: 30px;
    border-radius: var(--radius-card);
    text-align: center;
    border: 1px solid #dbeafe;
}

.video-lock-notice {
    background: white;
    display: inline-block;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--dark-blue);
    margin: 15px 0;
    font-weight: 500;
    border: 1px solid #bfdbfe;
}

.expire-notice {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--alert-red);
}

.report-footer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.8rem;
    color: var(--text-gray);
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

/* Mobile Improvements */
@media (max-width: 700px) {
    .hero-section {
        flex-direction: column;
        gap: 20px;
    }

    .headline {
        font-size: 1.5rem;
    }

    .sub-headline {
        font-size: 1rem;
    }

    .risk-cards {
        grid-template-columns: 1fr;
    }

    .medical-paper {
        padding: 20px;
        margin-top: 10px;
    }

    .container {
        padding: 15px;
    }

    .question-card {
        padding: 25px;
    }

    .question-title {
        font-size: 1.1rem;
    }

    .option-card {
        padding: 15px;
        gap: 10px;
    }

    .option-icon {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
        flex-shrink: 0;
    }

    .option-text {
        font-size: 0.95rem;
    }
}

/* --- CLICK ANIMATION --- */
@keyframes click-pulse {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(0.96);
        background-color: #eef6fc;
        border-color: var(--primary-blue);
    }

    100% {
        transform: scale(1);
        background-color: #eef6fc;
        border-color: var(--primary-blue);
    }
}

.click-animate {
    animation: click-pulse 0.3s ease-in-out forwards;
}

/* --- 3D PROSTATE ANIMATION --- */
.prostate-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
}

.prostate-3d {
    max-width: 300px;
    width: 100%;
    height: auto;
    animation: rotate-3d 8s linear infinite;
    filter: drop-shadow(0 10px 20px rgba(29, 112, 184, 0.2));
}

@keyframes rotate-3d {
    0% {
        transform: rotateY(0deg) rotateX(5deg);
    }

    100% {
        transform: rotateY(360deg) rotateX(5deg);
    }
}

/* --- TESTIMONIALS CAROUSEL --- */
.testimonials-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.testimonials-title {
    text-align: center;
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 30px;
    font-family: var(--font-head);
}

.testimonials-carousel {
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-card {
    min-width: 100%;
    padding: 25px;
    background: white;
    border-radius: var(--radius-btn);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.testimonial-stars {
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-align: center;
}

.testimonial-text {
    font-size: 1rem;
    color: var(--text-dark);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: center;
}

.testimonial-author {
    font-size: 0.9rem;
    color: var(--text-gray);
    font-weight: 600;
    text-align: center;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--primary-blue);
    transform: scale(1.2);
}

/* Mobile Improvements */
@media (max-width: 700px) {
    .hero-section {
        flex-direction: column;
        gap: 20px;
    }

    .headline {
        font-size: 1.5rem;
    }

    .sub-headline {
        font-size: 1rem;
    }

    .risk-cards {
        grid-template-columns: 1fr;
    }

    .medical-paper {
        padding: 20px;
        margin-top: 10px;
    }

    .container {
        padding: 15px;
    }

    .question-card {
        padding: 25px;
    }

    .question-title {
        font-size: 1.1rem;
    }

    .option-card {
        padding: 15px;
        gap: 10px;
    }

    .option-icon {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
        flex-shrink: 0;
    }

    .option-text {
        font-size: 0.95rem;
    }

    /* Report page mobile improvements */
    .report-head {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .patient-info {
        flex-direction: column;
        gap: 10px;
    }

    .results-table {
        font-size: 0.85rem;
    }

    .results-table th,
    .results-table td {
        padding: 10px 8px;
    }

    .btn-large {
        padding: 18px 25px;
        font-size: 1rem;
    }

    .prostate-3d {
        max-width: 200px;
    }

    .testimonials-title {
        font-size: 1.1rem;
    }

    .testimonial-text {
        font-size: 0.95rem;
    }
}

/* --- CLICK ANIMATION --- */
@keyframes click-pulse {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(0.96);
        background-color: #eef6fc;
        border-color: var(--primary-blue);
    }

    100% {
        transform: scale(1);
        background-color: #eef6fc;
        border-color: var(--primary-blue);
    }
}

.click-animate {
    animation: click-pulse 0.3s ease-in-out forwards;
}

/* --- FIX REPORT CHART SIZE --- */
.score-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.score-circle {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 2.5;
}

.circle {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
}

.circular-chart.red .circle {
    stroke: var(--alert-red);
}

.percentage {
    fill: #666;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 0.5em;
    text-anchor: middle;
}

.score-info h3 {
    color: var(--dark-blue);
    margin-bottom: 10px;
}

.score-info p {
    color: var(--text-gray);
    font-size: 1rem;
}

@media (max-width: 600px) {
    .score-box {
        flex-direction: column;
        text-align: center;
    }

    .risk-cards {
        grid-template-columns: 1fr;
    }

    .results-table th,
    .results-table td {
        font-size: 0.8rem;
        padding: 8px 5px;
    }

    .report-head {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .patient-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}