/* --- CUSTOM FONT CLASSES --- */
.font-title { font-family: 'Righteous', cursive; }
.font-slogan { font-family: 'Pacifico', cursive; font-weight: 400; }
.font-sub-slogan { font-family: 'Saira+Condensed', sans-serif; font-weight: 700; letter-spacing: 0.2em; }
body { font-family: 'Inter', sans-serif; } /* Default font */
.font-orbitron { font-family: 'Orbitron', sans-serif; } 
.font-squada { font-family: 'Squada One', cursive; }
.font-chakra { font-family: 'Chakra Petch', sans-serif; } /* NEW: Chakra Petch font class */

/* Animated Background */
@keyframes subtleGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.animated-bg { background: linear-gradient(-45deg, #eff6ff, #ffffff, #e0f7f9); background-size: 400% 400%; animation: subtleGradient 20s ease infinite; }

/* Pulse effect for Pay buttons */
@keyframes subtlePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7); } 50% { box-shadow: 0 0 0 10px rgba(79, 70, 229, 0); } }
.pulse-shadow { animation: subtlePulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1); z-index: 20; position: relative; }

/* NEW: Breathe animation for Mock Tests button */
@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(79, 70, 229, 0.4), 0 0 5px rgba(16, 185, 129, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(79, 70, 229, 0.7), 0 0 15px rgba(16, 185, 129, 0.7);
    }
}
.mock-test-button-animated {
    background-image: linear-gradient(to right, #4F46E5, #10B981);
    animation: breathe 2.5s infinite ease-in-out;
}


/* Animation Keyframes */
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
.fade-in-up { opacity: 0; transform: translateY(20px); animation: fadeInUp 0.8s ease-out forwards; }
@keyframes fallDown { from { opacity: 0; transform: translateY(-40px) scale(0.8); } to { opacity: 1; transform: translateY(0) scale(1); } }
.fall-char { display: inline-block; animation: fallDown 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) forwards; opacity: 0; }
@keyframes typing { from { width: 0; } to { width: 100%; } }
@keyframes blink-caret { from, to { border-color: transparent; } 50% { border-color: #10B981; } }
.typewriter-container { display: inline-block; overflow: hidden; white-space: nowrap; border-right: .1em solid #10B981; width: 0; animation: typing 3s steps(32, end) 1.2s forwards, blink-caret .75s step-end 4 1.2s forwards; }

/* General & Modern Styling */
.soft-shadow { box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1), 0 0 15px -5px rgba(0, 0, 0, 0.05); }
.test-details { max-height: 0; opacity: 0; visibility: hidden; overflow: hidden; transition: max-height 500ms ease-in-out, opacity 400ms ease-in-out, visibility 500ms ease-in-out; z-index: 5; }
.test-details.open { max-height: 500px; opacity: 1; visibility: visible; }

/* MODIFIED: Renamed .pqp-details to .sidebar-accordion-content and reduced max-height */
.sidebar-accordion-content { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; transition: max-height 300ms ease-out, opacity 300ms ease-out, padding 300ms ease-out; }
.sidebar-accordion-content.open { max-height: 210px; opacity: 1; padding-top: 0.5rem; padding-bottom: 0.25rem; } /* Reduced max-height to 210px (70%) */

.screen { display: none; } /* Keep starting hidden */
.required-asterisk:after { content: '*'; color: #ef4444; margin-left: 2px; }


/* --- NEW: Simplified Tab Styles --- */
.browser-tabs-container {
    display: flex;
    background-color: #f3f4f6; /* gray-100 */
    border-top-left-radius: 0.5rem; /* Match parent */
    border-top-right-radius: 0.5rem; /* Match parent */
}

.browser-tab {
    flex: 1; /* Make tabs stretch and fill space */
    padding: 0.5rem 1rem; /* MODIFIED: Reduced padding (height) */
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-out;
    color: #4b5563; /* gray-600 */
    border-bottom: 3px solid transparent;
    font-size: 0.875rem; /* MODIFIED: Reduced font size (text-sm) */
}
.browser-tab:first-child {
    border-top-left-radius: 0.5rem;
}
.browser-tab:last-child {
     border-top-right-radius: 0.5rem;
}

.browser-tab.active {
    color: white;
    background-image: linear-gradient(to right, #4F46E5, #10B981);
    border-bottom-color: #4F46E5; /* Primary color accent */
    box-shadow: 0 2px 8px -2px rgba(79, 70, 229, 0.4);
}

.exam-content-wrapper {
    background-color: white;
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 0.5rem; /* 8px */
    min-height: 280px; /* MODIFIED: Reduced min-height to 70% */
    position: relative;
    z-index: 5; /* Below active tab */
    /* REMOVED padding, margin-top, border-top */
    padding: 0; /* Container has no padding */
    overflow: hidden; /* To contain the rounded tabs */
}
/* --- End Tab Styles --- */


/* Exam Content Area */
.exam-content-area {
    display: none;
    padding: 1rem; /* NEW: Content area has padding */
}
.exam-content-area.active {
    display: block;
}
@keyframes cardFadeInUp { from { opacity: 0; transform: translateY(30px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.exam-content-area.active .exam-card-wrapper { animation: cardFadeInUp 0.6s ease-out forwards; opacity: 0; }

/* Card Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

.exam-card-new {
    position: relative;
    overflow: hidden;
    border-radius: 1rem; /* MODIFIED: Reduced radius */
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, background 0.4s ease;
    transform-style: preserve-3d;
    animation: float 5s ease-in-out infinite;
}

.exam-card-new:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    animation-play-state: paused;
}
.exam-card-new .aurora { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.2), transparent 80%); opacity: 0; transition: opacity 0.4s ease; pointer-events: none; transform: translateZ(20px); }
.exam-card-new:hover .aurora { opacity: 1; }
.exam-tag { display: inline-block; padding: 2px 8px; font-size: 0.65rem; font-weight: 700; border-radius: 9999px; letter-spacing: 0.05em; text-transform: uppercase; } /* MODIFIED: Reduced padding/font */
.details-panel-new { background-color: rgba(255, 255, 255, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 0.3); }

/* Spinner */
.spinner { border: 4px solid rgba(0, 0, 0, 0.1); width: 36px; height: 36px; border-radius: 50%; border-left-color: #4F46E5; animation: spin 1s ease infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Modal transitions */
.modal.hidden .modal-content {
    transform: scale(0.95);
    opacity: 0;
}
.modal .modal-content {
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    /* MODIFIED: Add max-height for scroll on small screens */
    max-height: 90vh;
    overflow-y: auto;
}

 /* iFrame Container */
#exam-iframe-container {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 60;
    background-color: #f9fafb;
    display: flex;
    flex-direction: column;
}
#exam-iframe {
    flex-grow: 1;
    border: none;
}
#exam-iframe-container.hidden {
    display: none;
}

/* RIGHT CLICK & COPY PREVENTION */
body, html {
    -webkit-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* NEW: Footer Link Styling */
.footer-policy-link {
    color: #d1d5db; /* gray-300 */
    transition: color 0.2s ease-in-out;
}
.footer-policy-link:hover {
    color: #ffffff; /* white */
    text-decoration: underline;
}

/* NEW: Policy Modal Content Styling */
#policy-modal-content-area {
    white-space: pre-wrap; /* Preserve formatting */
    max-height: 60vh; /* Limit height and enable scroll */
    overflow-y: auto;
    font-size: 0.875rem; /* text-sm */
    line-height: 1.5;
    color: #4b5563; /* gray-600 */
}
/* Custom Scrollbar for policy content */
#policy-modal-content-area::-webkit-scrollbar { width: 6px; }
#policy-modal-content-area::-webkit-scrollbar-track { background: #e5e7eb; border-radius: 3px; }
#policy-modal-content-area::-webkit-scrollbar-thumb { background: #9ca3af; border-radius: 3px; }
#policy-modal-content-area::-webkit-scrollbar-thumb:hover { background: #6b7280; }


/* --- NEW: Stats Ticker Styles --- */
.text-gradient-blue { background-image: linear-gradient(to right, #3b82f6, #60a5fa); -webkit-background-clip: text; color: transparent; background-clip: text; }
.text-gradient-green { background-image: linear-gradient(to right, #10b981, #34d399); -webkit-background-clip: text; color: transparent; background-clip: text; }
.text-gradient-red { background-image: linear-gradient(to right, #ef4444, #f87171); -webkit-background-clip: text; color: transparent; background-clip: text; }
.text-gradient-yellow { background-image: linear-gradient(to right, #f59e0b, #fcd34d); -webkit-background-clip: text; color: transparent; background-clip: text; }


#stats-ticker-container {
    position: relative;
    width: 100%;
    height: 1.75rem; /* h-7 */
    overflow: hidden;
}

.stat-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(100%); /* Start off-screen right */
    letter-spacing: 0.1em; 
}

.stat-slide.active {
    transform: translateX(0); /* Slide to center */
}
.stat-slide.exit {
    transform: translateX(-100%); /* Slide off-screen left */
}
/* --- End Stats Ticker Styles --- */

/* --- NEW: Animated Feedback Button --- */
#feedback-button-container {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    border-radius: 9999px; /* rounded-full */
    background-color: white; /* bg-white */
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-lg */
}
#feedback-icon {
    /* MODIFIED: Reduced size and padding */
    width: 1.75rem; /* w-7 */
    height: 1.75rem; /* h-7 */
    padding: 0.375rem; /* p-1.5 */ /* <-- INCREASED PADDING */
    border-radius: 9999px;
    background-color: #4F46E5; /* bg-primary-color */
    color: white;
    flex-shrink: 0;
    transition: all 0.3s ease-in-out;
}
#feedback-text-content {
    white-space: nowrap;
    max-width: 0;
    opacity: 0;
    transition: max-width 0.3s ease-in-out, opacity 0.2s ease-in-out, transform 0.3s ease-in-out;
    transform: translateX(-10px);
    font-size: 0.75rem; /* text-xs */
    font-weight: 600; /* font-semibold */
    color: #4F46E5; /* text-primary-color */
    padding-left: 0.25rem;
    padding-right: 0.75rem; /* pr-3 */
}
#feedback-button-container:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-xl */
}
#feedback-button-container:hover #feedback-text-content {
    max-width: 100px; /* Reveal text */
    opacity: 1;
    transform: translateX(0);
}
#feedback-button-container:hover #feedback-icon {
    background-color: #10B981; /* bg-accent-color */
}
#feedback-button-container[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
/* --- End Feedback Button --- */

/* --- NEW: Quick Test List Dropdown --- */
#quick-test-list-container {
    position: absolute;
    top: 100%; /* Position right below the header */
    right: 0;
    width: 320px; /* Fixed width */
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease-out;
    background-color: white;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    pointer-events: none;
}
#quick-test-list-container.open {
    max-height: 300px; /* Max height for dropdown */
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
#quick-test-list {
    max-height: 300px;
    overflow-y: auto;
}
/* Custom scrollbar for quick list */
#quick-test-list::-webkit-scrollbar { width: 5px; }
#quick-test-list::-webkit-scrollbar-track { background: #f1f5f9; }
#quick-test-list::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 5px; }
#quick-test-list::-webkit-scrollbar-thumb:hover { background: #64748b; }
/* --- End Quick Test List --- */

/* --- NEW: Vertical Stats Ticker Styles --- */
.stats-ticker-vertical-container {
    position: relative;
    width: 100%;
    height: 2.5rem; /* h-10, small rectangular card */
    overflow: hidden;
    background-color: white;
    border-radius: 0.5rem; /* rounded-lg */
    margin-bottom: 0.75rem; /* mb-3 */
    border: 1px solid #e5e7eb; /* border-gray-200 */
}
.stat-slide-vertical {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.6s ease;
    transform: translateY(100%); /* Start off-screen bottom */
    opacity: 0;
}
.stat-slide-vertical.active {
    transform: translateY(0); /* Slide to center */
    opacity: 1;
}
.stat-slide-vertical.exit-up {
    transform: translateY(-100%); /* Slide off-screen top */
    opacity: 0;
}
/* --- End Vertical Stats Ticker --- */


/* --- NEW: "ASK AI" BUTTON STYLES --- */
@keyframes ai-glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(79, 70, 229, 0.5), 0 0 5px rgba(236, 72, 153, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px rgba(79, 70, 229, 0.8), 0 0 10px rgba(236, 72, 153, 0.7);
        transform: scale(1.03);
    }
}
.ask-ai-button-container {
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%), linear-gradient(135deg, #f3e8ff 0%, #e0f2fe 100%);
    border: 1px solid rgba(255,255,255,0.5);
}
.ask-ai-button {
    background: linear-gradient(135deg, #4F46E5 0%, #EC4899 100%);
    animation: ai-glow 3s infinite ease-in-out;
}
.ask-ai-button:hover {
    animation-play-state: paused;
    transform: scale(1.02);
}

/* --- NEW: AI CHAT MODAL STYLES (Simplified) --- */
#ai-chat-modal .modal-content {
    width: 100%;
    max-width: 600px; /* Standard modal width */
    height: 70vh; /* 70% of viewport height */
    max-height: 700px; /* Max height */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent modal itself from scrolling */
}

#ai-chat-history {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem; /* p-3 sm:p-4 */
    background-color: #f9fafb; /* gray-50 */
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* space-y-3 */
}

.ai-chat-bubble {
    width: fit-content;
    max-width: 90%;
    padding: 0.625rem 1rem; /* 10px 16px */
    border-radius: 1rem; /* rounded-2xl */
    line-height: 1.6;
    font-size: 0.925rem;
    word-wrap: break-word; /* Ensure long words break */
}

.ai-chat-bubble.user {
    background-color: #4F46E5; /* primary-color */
    color: white;
    border-bottom-right-radius: 0.25rem; /* rounded-br-md */
    align-self: flex-end;
}

.ai-chat-bubble.model {
    background-color: #e5e7eb; /* gray-200 */
    color: #1f2937; /* gray-800 */
    border-bottom-left-radius: 0.25rem; /* rounded-bl-md */
    align-self: flex-start;
}

.ai-chat-bubble.error {
    background-color: #fee2e2; /* red-100 */
    color: #991b1b; /* red-800 */
    border-bottom-left-radius: 0.25rem;
    align-self: flex-start;
}

.ai-chat-bubble .spinner {
    width: 20px;
    height: 20px;
    border-left-color: #4F46E5;
}

/* --- NEW: AI Response Formatting --- */
.ai-chat-bubble.model strong {
    font-weight: 700;
    color: #111827;
}
.ai-chat-bubble.model em {
    font-style: italic;
}
.ai-chat-bubble.model ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}
.ai-chat-bubble.model li {
    margin-bottom: 0.25rem;
}
.ai-chat-bubble.model code {
    background-color: #d1d5db;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.875rem;
}
.ai-chat-bubble.model pre {
    background-color: #1f2937;
    color: #f3f4f6;
    padding: 0.75rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-family: monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
}
/* Ensure formatting works with <br> tags */
.ai-chat-bubble.model ul br,
.ai-chat-bubble.model li br {
    display: none; /* Hide line breaks inside lists */
}
.ai-chat-bubble.model pre br {
    display: none; /* Hide line breaks inside code blocks */
}


#ai-chat-form {
    display: flex;
    align-items: center;
    padding: 0.75rem; /* p-3 */
    background-color: #ffffff;
    flex-shrink: 0;
    /* Removed border-top, will be on a container */
}

/* NEW: Container for form + disclaimer */
.ai-chat-input-area {
    border-top: 1px solid #e5e7eb; /* border-gray-200 */
}

/* NEW: AI Chat Disclaimer */
.ai-chat-disclaimer {
    font-size: 0.65rem; /* text-[10px] */
    color: #6b7280; /* gray-500 */
    text-align: center;
    padding: 0 0.75rem 0.5rem 0.75rem; /* px-3 pb-2 */
    background-color: #ffffff;
}

#ai-chat-input {
    flex-grow: 1;
    border: 1px solid #d1d5db; /* border-gray-300 */
    border-radius: 0.5rem; /* rounded-lg */
    padding: 0.625rem 1rem; /* py-2.5 px-4 */
    font-size: 0.925rem;
    outline: none;
    transition: all 0.2s ease;
}
#ai-chat-input:focus {
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}
#ai-chat-input:disabled {
    background-color: #f3f4f6;
}

#ai-chat-send-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem; /* w-11 */
    height: 2.75rem; /* h-11 */
    margin-left: 0.75rem; /* ml-3 */
    flex-shrink: 0;
    background-color: #4F46E5;
    color: white;
    border-radius: 9999px; /* rounded-full */
    transition: all 0.2s ease;
}
#ai-chat-send-button:hover {
    background-color: #4338ca; /* indigo-700 */
}
#ai-chat-send-button:disabled {
    background-color: #a5b4fc; /* indigo-300 */
    cursor: not-allowed;
}
#ai-chat-send-button .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-left-color: white;
}
/* --- END AI CHAT STYLES --- */

