/* Eye Anatomy Explorer v2 - Compact & Animated */

/* Eye Health Tools Wrapper */
.eye-health-tools {
    background: linear-gradient(135deg, var(--bg-body) 0%, var(--bg-surface) 100%);
    padding-top: 80px;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px 25px;
    background: var(--bg-card);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(8px);
}

.tool-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(0, 206, 209, 0.2) 0%, rgba(0, 206, 209, 0.05) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00CED1;
    font-size: 24px;
    border: 1px solid rgba(0, 206, 209, 0.3);
    flex-shrink: 0;
}

/* Section */
.eye-anatomy {
    padding: 60px 0;
    background: transparent;
    position: relative;
    overflow: hidden;
}

/* Main Layout - Compact */
.eye-explorer-v2 {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

/* Diagram Container */
.eye-diagram-container {
    position: relative;
}

.eye-svg {
    width: 100%;
    height: auto;
    max-height: 320px;
    animation: floatEye 6s ease-in-out infinite;
}

@keyframes floatEye {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-8px) scale(1.01);
    }
}

/* Eye Parts Interactivity */
.eye-part {
    cursor: pointer;
    transition: all 0.3s ease;
}

.eye-part:hover {
    filter: brightness(1.2) drop-shadow(0 0 8px rgba(0, 206, 209, 0.5));
}

.eye-part.active {
    stroke: #00CED1 !important;
    stroke-width: 3 !important;
    filter: drop-shadow(0 0 15px rgba(0, 206, 209, 0.7));
    animation: partPulse 1.5s ease-in-out infinite;
}

@keyframes partPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 10px rgba(0, 206, 209, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(0, 206, 209, 0.8));
    }
}

/* Labels with staggered animation */
.label-group {
    cursor: pointer;
    opacity: 0;
    animation: labelAppear 0.5s ease forwards;
}

.label-group:nth-child(1) {
    animation-delay: 0.1s;
}

.label-group:nth-child(2) {
    animation-delay: 0.2s;
}

.label-group:nth-child(3) {
    animation-delay: 0.3s;
}

.label-group:nth-child(4) {
    animation-delay: 0.4s;
}

.label-group:nth-child(5) {
    animation-delay: 0.5s;
}

.label-group:nth-child(6) {
    animation-delay: 0.6s;
}

.label-group:nth-child(7) {
    animation-delay: 0.7s;
}

@keyframes labelAppear {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.label-group circle {
    transition: all 0.3s ease;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        r: 5;
        opacity: 0.8;
    }

    50% {
        r: 7;
        opacity: 1;
    }
}

.label-group:hover circle {
    r: 9;
    fill: #00E5E5;
    filter: drop-shadow(0 0 8px rgba(0, 229, 229, 0.8));
    animation: none;
}

.label-group:hover text {
    fill: #00CED1;
}

.label-group text {
    font-family: 'Outfit', sans-serif;
    transition: fill 0.3s ease;
    font-size: 16px;
    font-weight: 700;
    fill: var(--text-main) !important;
}

.label-group line {
    stroke-dasharray: 4;
    animation: dashMove 20s linear infinite;
}

@keyframes dashMove {
    to {
        stroke-dashoffset: -100;
    }
}

/* Info Panel - Compact */
.eye-info-panel-v2 {
    background: var(--bg-card);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    min-height: 320px;
    position: relative;
    overflow: hidden;
}

/* Animated background glow */
.eye-info-panel-v2::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 206, 209, 0.08) 0%, transparent 50%);
    animation: panelGlow 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes panelGlow {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(10%, 10%);
    }

    50% {
        transform: translate(-5%, 15%);
    }

    75% {
        transform: translate(-10%, -5%);
    }
}

/* Default State - Compact */
.info-default {
    text-align: center;
    position: relative;
    z-index: 1;
}

.info-icon-wrap {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, rgba(0, 206, 209, 0.2) 0%, rgba(0, 206, 209, 0.05) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #00CED1;
    border: 2px solid rgba(0, 206, 209, 0.3);
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 206, 209, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 5px rgba(0, 206, 209, 0.2);
    }
}

.info-default h4 {
    color: var(--text-main);
    font-size: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.info-default p {
    color: var(--text-sec);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Quick Stats - Compact */
.quick-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #00CED1;
    line-height: 1;
    animation: countUp 0.5s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
    display: block;
}

/* Content State - Compact */
.info-content-v2 {
    animation: slideIn 0.4s ease;
    position: relative;
    z-index: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.info-close-btn {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #64748B;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 15px;
}

.info-close-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    color: #1e293b;
    transform: translateX(-3px);
}

.info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.info-icon-sm {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00CED1 0%, #00ACC1 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
    0% {
        transform: scale(0);
    }

    60% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.info-header h3 {
    font-size: 26px;
    color: var(--text-main);
    font-weight: 600;
    margin: 0;
}

.info-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-sec);
    margin-bottom: 15px;
}

/* Conditions Box - Compact */
.conditions-box {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.conditions-box h5 {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.conditions-box h5 i {
    color: #00CED1;
}

.condition-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.condition-tag {
    background: rgba(0, 206, 209, 0.12);
    color: #00CED1;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(0, 206, 209, 0.2);
    transition: all 0.3s ease;
    animation: tagPop 0.3s ease backwards;
}

.condition-tag:nth-child(1) {
    animation-delay: 0.1s;
}

.condition-tag:nth-child(2) {
    animation-delay: 0.2s;
}

.condition-tag:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes tagPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.condition-tag:hover {
    background: rgba(0, 206, 209, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 206, 209, 0.2);
}

/* CTA Button - Compact */
.consult-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #00CED1 0%, #00ACC1 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 206, 209, 0.3);
    position: relative;
    overflow: hidden;
}

.consult-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.consult-btn:hover::before {
    left: 100%;
}

.consult-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 206, 209, 0.4);
}

/* Vitreous sparkle animation */
.eye-main ellipse[data-part="vitreous"] {
    animation: vitreousSparkle 4s ease-in-out infinite;
}

@keyframes vitreousSparkle {

    0%,
    100% {
        opacity: 0.2;
    }

    50% {
        opacity: 0.35;
    }
}

/* Pupil dilation animation */
.eye-main ellipse[cx="120"][cy="200"][rx="12"] {
    animation: pupilDilate 5s ease-in-out infinite;
    transform-origin: center;
    transform-box: fill-box;
}

@keyframes pupilDilate {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.85);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .eye-explorer-v2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .eye-svg {
        max-height: 250px;
    }

    .eye-info-panel-v2 {
        min-height: auto;
        padding: 20px;
    }
}