/* ===================================
   ELITE ANALYSIS MODAL - ULTRA PREMIUM
   Design inspirado em Apple Intelligence
   Cards + Glassmorphism + Animações delicadas
   =================================== */

/* ===================================
   OVERLAY
   =================================== */

.elite-analysis-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(50px) saturate(160%);
    -webkit-backdrop-filter: blur(50px) saturate(160%);

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;

    z-index: 10000;
    opacity: 0;
    animation: ultra-fade-in 0.35s ease-out forwards;
}

.elite-analysis-overlay.light-theme {
    background: rgba(255, 255, 255, 0.4);
}

@keyframes ultra-fade-in {
    to { opacity: 1; }
}

.elite-analysis-overlay.hidden {
    display: none;
}

/* ===================================
   MODAL CONTAINER
   =================================== */

.elite-analysis-modal {
    background: rgba(20, 20, 22, 0.92);
    backdrop-filter: blur(80px) saturate(200%);
    -webkit-backdrop-filter: blur(80px) saturate(200%);

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;

    max-width: 720px;
    width: 100%;
    max-height: 88vh;

    box-shadow:
        0 40px 120px rgba(0, 0, 0, 0.5),
        0 0 1px rgba(255, 255, 255, 0.15) inset;

    overflow: hidden;
    position: relative;

    transform: scale(0.94) translateY(30px);
    opacity: 0;
    animation: ultra-modal-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.05s forwards;
}

.elite-analysis-overlay.light-theme .elite-analysis-modal {
    background: rgba(252, 252, 253, 0.94);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow:
        0 40px 120px rgba(0, 0, 0, 0.15),
        0 0 1px rgba(0, 0, 0, 0.08) inset;
}

@keyframes ultra-modal-enter {
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ===================================
   CLOSE BUTTON
   =================================== */

.elite-analysis-close-x {
    position: absolute;
    top: 22px;
    right: 22px;

    width: 34px;
    height: 34px;

    background: rgba(142, 142, 147, 0.14);
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 15px;
    color: rgba(235, 235, 245, 0.55);

    cursor: pointer;
    z-index: 10;

    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.elite-analysis-overlay.light-theme .elite-analysis-close-x {
    background: rgba(142, 142, 147, 0.1);
    border-color: rgba(0, 0, 0, 0.04);
    color: rgba(60, 60, 67, 0.55);
}

.elite-analysis-close-x:hover {
    background: rgba(142, 142, 147, 0.22);
    color: rgba(235, 235, 245, 0.85);
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.elite-analysis-overlay.light-theme .elite-analysis-close-x:hover {
    background: rgba(142, 142, 147, 0.16);
    color: rgba(60, 60, 67, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
}

.elite-analysis-close-x:active {
    transform: scale(0.96);
}

/* ===================================
   ESC HINT
   =================================== */

.elite-analysis-esc-hint {
    position: absolute;
    top: 26px;
    left: 26px;

    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    font-size: 12px;
    color: rgba(235, 235, 245, 0.45);

    display: flex;
    align-items: center;
    gap: 7px;

    opacity: 0;
    animation: ultra-hint-in 0.4s ease 0.9s forwards;
}

.elite-analysis-overlay.light-theme .elite-analysis-esc-hint {
    color: rgba(60, 60, 67, 0.45);
}

@keyframes ultra-hint-in {
    to { opacity: 1; }
}

.elite-analysis-esc-hint kbd {
    background: rgba(142, 142, 147, 0.14);
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    border-radius: 5px;
    padding: 3px 7px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: rgba(235, 235, 245, 0.65);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.elite-analysis-overlay.light-theme .elite-analysis-esc-hint kbd {
    background: rgba(142, 142, 147, 0.1);
    border-color: rgba(0, 0, 0, 0.05);
    color: rgba(60, 60, 67, 0.65);
}

/* ===================================
   HEADER - Ultra Premium
   =================================== */

.elite-analysis-header {
    padding: 60px 36px 28px 36px;
    text-align: center;
    position: relative;
    background: linear-gradient(180deg,
        rgba(0, 122, 255, 0.03) 0%,
        transparent 100%
    );
}

.elite-analysis-overlay.light-theme .elite-analysis-header {
    background: linear-gradient(180deg,
        rgba(0, 122, 255, 0.02) 0%,
        transparent 100%
    );
}

/* Icon - Premium Badge Style */
.elite-analysis-icon-mega {
    width: 76px;
    height: 76px;
    margin: 0 auto 22px;
    position: relative;
}

.elite-analysis-icon-center {
    width: 76px;
    height: 76px;

    background: linear-gradient(135deg,
        rgba(0, 122, 255, 0.12),
        rgba(10, 132, 255, 0.18)
    );

    border: 1.5px solid rgba(0, 122, 255, 0.2);
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
    z-index: 1;

    box-shadow:
        0 10px 40px rgba(0, 122, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);

    animation: ultra-icon-levitate 5s ease-in-out infinite;
}

.elite-analysis-overlay.light-theme .elite-analysis-icon-center {
    background: linear-gradient(135deg,
        rgba(0, 122, 255, 0.08),
        rgba(10, 132, 255, 0.14)
    );
    border-color: rgba(0, 122, 255, 0.25);
    box-shadow:
        0 10px 40px rgba(0, 122, 255, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

@keyframes ultra-icon-levitate {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-5px) scale(1.02); }
}

.elite-analysis-icon-center i {
    font-size: 32px;
    background: linear-gradient(135deg, #0A84FF, #007AFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 10px rgba(0, 122, 255, 0.4));
}

.elite-analysis-overlay.light-theme .elite-analysis-icon-center i {
    background: linear-gradient(135deg, #007AFF, #0051D5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Badge AI */
.elite-analysis-ai-badge {
    position: absolute;
    top: -3px;
    right: -3px;

    background: linear-gradient(135deg, #5E5CE6 0%, #007AFF 100%);
    padding: 4px 9px;
    border-radius: 10px;

    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
    text-transform: uppercase;

    box-shadow: 0 4px 18px rgba(94, 92, 230, 0.45);
}

/* Title */
.elite-analysis-title {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.96);
    margin-bottom: 7px;
    letter-spacing: -0.6px;
}

.elite-analysis-overlay.light-theme .elite-analysis-title {
    color: rgba(0, 0, 0, 0.92);
}

.elite-analysis-subtitle {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    font-size: 13px;
    color: rgba(235, 235, 245, 0.55);
    font-weight: 400;
    letter-spacing: 0.1px;
}

.elite-analysis-overlay.light-theme .elite-analysis-subtitle {
    color: rgba(60, 60, 67, 0.55);
}

/* ===================================
   CONTENT AREA - CARD BASED
   =================================== */

.elite-analysis-content {
    padding: 0 36px 36px 36px;
    max-height: calc(88vh - 260px);
    overflow-y: auto;
    overflow-x: hidden;

    opacity: 0;
    transform: translateY(15px);
    animation: ultra-content-in 0.5s ease 0.25s forwards;
}

@keyframes ultra-content-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom scrollbar ultra delicado */
.elite-analysis-content::-webkit-scrollbar {
    width: 6px;
}

.elite-analysis-content::-webkit-scrollbar-track {
    background: transparent;
}

.elite-analysis-content::-webkit-scrollbar-thumb {
    background: rgba(142, 142, 147, 0.18);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.elite-analysis-overlay.light-theme .elite-analysis-content::-webkit-scrollbar-thumb {
    background: rgba(142, 142, 147, 0.14);
}

.elite-analysis-content::-webkit-scrollbar-thumb:hover {
    background: rgba(142, 142, 147, 0.28);
}

/* ===================================
   CONTENT CARDS - Apple Intelligence Style
   =================================== */

.elite-analysis-text {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

/* Section Headers */
.elite-analysis-text h2,
.elite-analysis-text h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-size: 19px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.94);
    margin: 28px 0 14px 0;
    letter-spacing: -0.4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.elite-analysis-overlay.light-theme .elite-analysis-text h2,
.elite-analysis-overlay.light-theme .elite-analysis-text h3 {
    color: rgba(0, 0, 0, 0.9);
}

.elite-analysis-text h2:first-child,
.elite-analysis-text h3:first-child {
    margin-top: 0;
}

/* Paragraphs */
.elite-analysis-text p {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(235, 235, 245, 0.82);
    margin: 0 0 14px 0;
}

.elite-analysis-overlay.light-theme .elite-analysis-text p {
    color: rgba(0, 0, 0, 0.8);
}

/* Lists - Card Style */
.elite-analysis-text ol,
.elite-analysis-text ul {
    margin: 0 0 20px 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.elite-analysis-text li {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 16px 18px;

    font-size: 15px;
    line-height: 1.5;
    color: rgba(235, 235, 245, 0.85);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.elite-analysis-overlay.light-theme .elite-analysis-text li {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.82);
}

.elite-analysis-text li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #0A84FF, #007AFF);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.elite-analysis-text li:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 122, 255, 0.3);
    transform: translateX(4px);
}

.elite-analysis-overlay.light-theme .elite-analysis-text li:hover {
    background: rgba(0, 0, 0, 0.035);
    border-color: rgba(0, 122, 255, 0.25);
}

.elite-analysis-text li:hover::before {
    opacity: 1;
}

/* Numbered lists */
.elite-analysis-text ol {
    counter-reset: ultra-counter;
}

.elite-analysis-text ol li {
    counter-increment: ultra-counter;
    padding-left: 54px;
    position: relative;
}

.elite-analysis-text ol li::after {
    content: counter(ultra-counter);
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);

    width: 26px;
    height: 26px;

    background: linear-gradient(135deg, #0A84FF, #007AFF);
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #fff;

    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.35);
}

/* Strong text */
.elite-analysis-text strong {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.96);
}

.elite-analysis-overlay.light-theme .elite-analysis-text strong {
    color: rgba(0, 0, 0, 0.92);
}

/* Motivational Quote - Special Card */
.elite-analysis-text blockquote,
.elite-analysis-text .quote {
    background: linear-gradient(135deg,
        rgba(0, 122, 255, 0.08),
        rgba(10, 132, 255, 0.12)
    );
    border: 1px solid rgba(0, 122, 255, 0.15);
    border-radius: 16px;
    padding: 20px 22px;
    margin: 20px 0;

    font-size: 15px;
    line-height: 1.6;
    color: rgba(235, 235, 245, 0.9);
    font-style: italic;

    position: relative;
    overflow: hidden;
}

.elite-analysis-overlay.light-theme .elite-analysis-text blockquote,
.elite-analysis-overlay.light-theme .elite-analysis-text .quote {
    background: linear-gradient(135deg,
        rgba(0, 122, 255, 0.05),
        rgba(10, 132, 255, 0.08)
    );
    border-color: rgba(0, 122, 255, 0.18);
    color: rgba(0, 0, 0, 0.86);
}

.elite-analysis-text blockquote::before,
.elite-analysis-text .quote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 12px;
    font-size: 80px;
    font-family: Georgia, serif;
    color: rgba(0, 122, 255, 0.15);
    line-height: 1;
}

/* ===================================
   FOOTER
   =================================== */

.elite-analysis-footer {
    padding: 0 36px 36px 36px;
    display: flex;
    justify-content: center;
}

.elite-analysis-ok-btn {
    background: linear-gradient(180deg, #0A84FF 0%, #007AFF 100%);
    border: none;
    border-radius: 13px;

    padding: 15px 44px;
    min-width: 150px;

    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #fff;

    cursor: pointer;

    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.35);

    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.elite-analysis-overlay.light-theme .elite-analysis-ok-btn {
    background: linear-gradient(180deg, #007AFF 0%, #0051D5 100%);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.28);
}

.elite-analysis-ok-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    opacity: 0;
    transition: opacity 0.25s ease;
}

.elite-analysis-ok-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 28px rgba(0, 122, 255, 0.45);
}

.elite-analysis-overlay.light-theme .elite-analysis-ok-btn:hover {
    box-shadow: 0 10px 28px rgba(0, 122, 255, 0.38);
}

.elite-analysis-ok-btn:hover::before {
    opacity: 1;
}

.elite-analysis-ok-btn:active {
    transform: translateY(0) scale(1);
}

.elite-analysis-ok-btn i {
    margin-right: 7px;
    font-size: 14px;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .elite-analysis-modal {
        max-height: 92vh;
        border-radius: 28px;
    }

    .elite-analysis-header {
        padding: 52px 28px 24px 28px;
    }

    .elite-analysis-icon-mega {
        width: 68px;
        height: 68px;
    }

    .elite-analysis-icon-center {
        width: 68px;
        height: 68px;
    }

    .elite-analysis-icon-center i {
        font-size: 28px;
    }

    .elite-analysis-title {
        font-size: 23px;
    }

    .elite-analysis-content {
        padding: 0 28px 28px 28px;
        max-height: calc(92vh - 240px);
    }

    .elite-analysis-text h2,
    .elite-analysis-text h3 {
        font-size: 17px;
    }

    .elite-analysis-text p,
    .elite-analysis-text li {
        font-size: 14px;
    }

    .elite-analysis-text li {
        padding: 14px 16px;
    }

    .elite-analysis-text ol li {
        padding-left: 48px;
    }

    .elite-analysis-text ol li::after {
        width: 24px;
        height: 24px;
        font-size: 11px;
        left: 16px;
    }

    .elite-analysis-footer {
        padding: 0 28px 32px 28px;
    }

    .elite-analysis-ok-btn {
        width: 100%;
    }

    .elite-analysis-esc-hint {
        display: none;
    }
}

@media (max-width: 480px) {
    .elite-analysis-overlay {
        padding: 20px 14px;
    }

    .elite-analysis-modal {
        border-radius: 24px;
    }

    .elite-analysis-header {
        padding: 44px 24px 20px 24px;
    }

    .elite-analysis-content {
        padding: 0 24px 24px 24px;
    }

    .elite-analysis-footer {
        padding: 0 24px 28px 24px;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

@media (prefers-reduced-motion: reduce) {
    .elite-analysis-overlay,
    .elite-analysis-modal,
    .elite-analysis-icon-center,
    .elite-analysis-content,
    .elite-analysis-esc-hint {
        animation: none !important;
    }

    .elite-analysis-close-x:hover,
    .elite-analysis-ok-btn:hover,
    .elite-analysis-text li:hover {
        transform: none !important;
    }
}

.elite-analysis-close-x:focus-visible,
.elite-analysis-ok-btn:focus-visible {
    outline: 2px solid #007AFF;
    outline-offset: 3px;
}
