:root {
    --primary-color: #0a0a2a;
    /* Deep blue */
    --secondary-color: #1a1a4a;
    /* Slightly lighter blue */
    --accent-color: #00f7ff;
    /* Bright cyan/aqua accent */
    --text-color: #e0e0e0;
    /* Light grey for text */
    --text-darker: #a0a0a0;
    /* Darker grey for less emphasis */
    --glow-color: rgba(0, 247, 255, 0.5);
    /* Glow effect color */

    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;

    /* Responsive font sizes */
    --h1-size-desktop: 3.5rem;
    --h1-size-tablet: 2.8rem;
    --h1-size-mobile: 2.2rem;

    --h2-size-desktop: 2rem;
    --h2-size-tablet: 1.8rem;
    --h2-size-mobile: 1.5rem;

    --btn-size-desktop: 1.1rem;
    --btn-size-tablet: 1rem;
    --btn-size-mobile: 0.9rem;
}

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

/* Prevent media from overflowing on small screens */
img,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* Improve mobile text sizing behavior */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100vh;
    /* Allow scrolling */
    overflow-x: hidden;
    overflow-y: auto;
    /* Prevent vertical scrolling */
    position: relative;
    padding-bottom: env(safe-area-inset-bottom, 0);
    /* iOS safe area */
}

/* --- Three.js Background --- */
#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Behind everything else */
    /* background-color: transparent !important; */
    /* Remove transparency override */
}

/* --- Content Layout --- */
.content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    padding: 1rem 1rem 0.5rem;
    /* Significantly reduced padding */
    z-index: 1;
    /* Above background */
    position: relative;
    /* Needed for z-index */
    pointer-events: auto !important;
    /* Ensure this container allows clicks */
    width: 100%;
    min-height: auto;
    /* Remove min-height constraint */
    max-height: calc(100vh - 200px);
    /* Limit to viewport minus footer and game button */
    flex: 1;
    /* Allow content to grow */
    overflow: hidden;
    /* Prevent overflow */
}

.top-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.top-section h1 {
    font-family: var(--font-secondary);
    font-size: var(--h1-size-desktop);
    font-weight: 700;
    margin-bottom: 0.5rem;
    /* Reduced from 2rem */
    margin-top: 0.5rem;
    /* Add small top margin */
    color: #fff;
    text-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color);
    letter-spacing: 2px;
    position: relative;
    /* Ensure stacking context */
    z-index: 2;
    /* Above container background/pseudo-elements */
}

.middle-section {
    margin: auto 0;
    /* This will center it vertically */
    padding: 2rem 0;
    width: 100%;
    text-align: center;
}

.bottom-section {
    width: 100%;
    padding: 0.5rem;
    /* Reduced from 1.5rem */
    text-align: center;
    z-index: 1;
    position: relative;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    /* Reduced from 12px */
}

.bottom-section .btn {
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
}

.main-buttons {
    display: flex;
    gap: 1.5rem;
    position: relative;
    /* Ensure stacking context */
    z-index: 2;
    /* Above container background/pseudo-elements */
    flex-wrap: wrap;
    /* Allow buttons to wrap on small screens */
    justify-content: center;
    width: 100%;
    max-width: 800px;
    /* Increased for three buttons */
}

/* --- Buttons --- */
.btn {
    font-family: var(--font-secondary);
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    padding: 10px 24px;
    /* Reduced from 12px 28px */
    font-size: var(--btn-size-desktop);
    font-weight: 600;
    border-radius: 50px;
    /* Pill shape */
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 5px var(--accent-color), inset 0 0 5px var(--accent-color);
    position: relative;
    /* Needed for z-index */
    z-index: 3;
    /* Ensure buttons are on top within their container */
    pointer-events: auto !important;
    /* Ensure buttons allow clicks */
    white-space: nowrap;
    /* Prevent text wrapping within buttons */
}

.btn:hover,
.btn:focus {
    background-color: var(--accent-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px var(--glow-color), 0 0 25px var(--glow-color), inset 0 0 10px rgba(255, 255, 255, 0.5);
    outline: none;
}

.btn-secondary {
    border-color: var(--text-darker);
    color: var(--text-darker);
    box-shadow: none;
    font-size: 0.9rem;
    padding: 8px 20px;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--text-darker);
    color: var(--primary-color);
    border-color: var(--text-darker);
    box-shadow: 0 0 10px rgba(160, 160, 160, 0.5);
}

/* --- Trainer Modal Styles --- */
.trainer-profile {
    display: flex;
    flex-direction: column;
    /* Stack vertically by default for better flow with video+img */
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
    /* Center text details */
    padding: 1rem;
}

.trainer-info h3 {
    color: var(--accent-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px var(--glow-color);
}

.trainer-info .highlight-text {
    font-style: italic;
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    display: block;
    border-left: 3px solid var(--accent-color);
    padding-left: 1rem;
}

.trainer-achievements {
    list-style: none;
    margin-top: 1.5rem;
}

.trainer-achievements li {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .trainer-profile {
        flex-direction: column;
        text-align: center;
    }

    .trainer-info .highlight-text {
        border-left: none;
        border-top: 2px solid var(--accent-color);
        padding-top: 1rem;
        padding-left: 0;
    }

    .trainer-achievements li {
        justify-content: center;
        /* Center list items on mobile */
        text-align: left;
        /* Keep text left aligned even if centered */
    }
}


/* --- Trainer Video Styles --- */
.video-container {
    width: 100%;
    max-width: 500px;
    margin-bottom: 2rem;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.2);
    border: 1px solid var(--accent-color);
}

.trainer-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.trainer-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 15px var(--glow-color);
    margin: 1rem 0;
}

/* --- Footer --- */
.footer {
    margin-top: 0;
    /* Reduced from 20px to 0 */
    padding: 8px 0;
    /* Reduced from 15px to 8px */
    background-color: transparent;
    border-top: none;
    text-align: center;
    box-shadow: none;
    width: 100%;
    position: relative;
    z-index: 5;
    backdrop-filter: blur(1px);
    display: block !important;
    /* Ensure footer is visible */
    visibility: visible !important;
    /* Ensure footer is visible */
    opacity: 1 !important;
    /* Ensure footer is fully opaque */
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.copyright {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    /* Reduced from 1rem */
    color: var(--text-color);
    /* Reduced from 10px */
    text-shadow: 0 0 5px rgba(0, 247, 255, 0.2);
    opacity: 0.8;
}

.footer-note {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    /* Reduced from 0.9rem */
    color: var(--accent-color);
    font-style: italic;
    text-shadow: 0 0 8px var(--glow-color);
    line-height: 1.3;
    /* Tighter line height */
    margin-bottom: 5px;
}

/* --- Modals --- */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 10;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    /* Allow scrolling if content is too tall */
    background-color: rgba(0, 0, 0, 0.3);
    /* Much less opacity to see the galaxy */
    backdrop-filter: blur(3px);
    /* Less blur to see stars better */
    /* Use flexbox to center the modal content */
    align-items: center;
    justify-content: center;
    /* Start hidden, use class to show */
    opacity: 0;
    /* Start fully transparent */
    transform: scale(1);
    /* Start at 1 for more subtle transition */
    filter: blur(0px);
    /* No initial blur for cleaner transitions */
    transition: opacity 0.4s ease-in-out, backdrop-filter 0.4s ease-in-out;
    /* Smoother transitions */
}

.modal.active {
    opacity: 1;
    transform: scale(1);
    filter: blur(0px);
    /* The display property is managed by JavaScript */
}

.modal-content {
    background-color: rgba(10, 10, 42, 0.3);
    /* More transparent background */
    margin: auto;
    padding: 30px;
    border: 1px solid var(--accent-color);
    width: 90%;
    /* More width on mobile by default */
    max-width: 700px;
    border-radius: 5px;
    box-shadow: 0 0 15px var(--glow-color), 0 0 30px var(--glow-color);
    position: relative;
    color: var(--text-color);
    transform: translateY(0);
    /* Reset any transforms */
    transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 0.6s ease;
    backdrop-filter: blur(3px);
    /* Lighter blur */
    overflow-y: auto;
    /* Allow scrolling on small screens */
    max-height: 90vh;
    /* Limit height on small screens */
}

/* Fullscreen modal option */
.fullscreen-modal {
    width: 90%;
    max-width: 1200px;
    height: auto;
    min-height: 70vh;
    max-height: 85vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: rgba(10, 10, 42, 0.15);
}

.modal-body-content {
    flex: 1;
    overflow-y: auto;
    width: 100%;
    padding: 10px;
    /* Custom Scrollbar for this section */
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) rgba(0, 0, 0, 0.3);
}

.modal-body-content::-webkit-scrollbar {
    width: 8px;
}

.modal-body-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.modal-body-content::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 4px;
}

/* Optional: Scanlines overlay - reduce opacity */
.modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
    z-index: 1;
    /* Below text/content */
    background-size: 100% 4px;
    pointer-events: none;
    opacity: 0.05;
    /* Reduce opacity of scanlines */
    animation: scanlines 20s linear infinite;
}

@keyframes scanlines {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 100%;
    }
}

.modal-content>*,
.modal-content .swiper {
    /* Ensure content is above scanlines */
    position: relative;
    z-index: 2;
}

.modal-content h2 {
    /* Keep styles */
    font-family: var(--font-secondary);
    color: var(--accent-color);
    margin-bottom: 20px;
    text-align: center;
    font-size: 2rem;
    text-shadow: 0 0 8px var(--glow-color), 0 0 15px rgba(0, 0, 0, 0.9);
    background-color: rgba(10, 10, 42, 0.4);
    /* Semi-transparent background */
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
}

/* Adjust close button for new background */
.close-btn {
    color: var(--text-darker);
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 32px;
    /* Slightly larger */
    font-weight: bold;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    z-index: 150;
    /* Above carousel card triggers (z-index: 100) */
    text-shadow: none;
    pointer-events: auto;
    /* Ensure clicks work */
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--glow-color);
    text-decoration: none;
    cursor: pointer;
}

/* --- Swiper Carousel Styles --- */
#vision-carousel,
#expectations-carousel {
    width: 100%;
    height: calc(100% - 80px);
    min-height: 400px;
    /* Ensure minimum height */
    margin-top: 20px;
    background: transparent;
    padding-bottom: 40px;
    overflow: visible;
    /* Allow content to be visible */
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: transparent;
    border-radius: 8px;
    opacity: 1;
    /* Make slides visible by default */
    transform: translateY(0);
    /* Remove initial transform */
    transition: opacity 0.3s ease, transform 0.3s ease;
    /* Faster transition */

    /* Center slide text vertically */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px;
    color: var(--text-color);
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
    hyphens: auto;
    overflow: visible;
    /* Changed from auto to visible to remove scrollbar */
    max-height: none;
    /* Remove max-height constraint */
    min-width: 0;
    /* Prevent flex children from overflowing and clipping */
}

.swiper-slide-active {
    opacity: 1;
    transform: translateY(0);
}

.swiper-slide h3 {
    color: var(--accent-color);
    margin-bottom: 25px;
    font-size: 2.4rem;
    transform: none;
    /* Remove the transform that could be causing issues */
    opacity: 1;
    /* Make sure it's visible */
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.9), 0 0 20px var(--glow-color);
    background-color: rgba(10, 10, 42, 0.5);
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
    max-width: 100%;
    position: relative;
    /* Ensure proper stacking */
    z-index: 2;
    transition: opacity 0.3s ease;
    /* Faster transition */
}

.swiper-slide-active h3 {
    opacity: 1;
}

.swiper-slide p {
    max-width: 95%;
    margin: 0 auto;
    margin-top: 15px;
    /* Add space after the heading */
    font-size: 1.3rem;
    line-height: 1.8;
    transform: none;
    /* Remove transform that could cause positioning issues */
    opacity: 1;
    /* Make sure it's visible */
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
    background-color: rgba(10, 10, 42, 0.6);
    padding: 15px;
    border-radius: 5px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
    position: relative;
    /* Ensure proper stacking */
    z-index: 2;
    transition: opacity 0.3s ease;
    /* Faster transition */
}

.swiper-slide-active p {
    opacity: 1;
}

/* Special styling for the comparison stories */
.swiper-slide p em {
    color: var(--accent-color);
    font-style: normal;
    font-weight: 500;
}

.swiper-slide p strong {
    color: #ff6b6b;
    /* Red for negative examples */
    font-weight: 500;
}

.swiper-pagination {
    bottom: 30px !important;
}

.swiper-pagination-bullet {
    background-color: var(--text-darker);
    opacity: 0.7;
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.swiper-pagination-bullet-active {
    background-color: var(--accent-color);
    opacity: 1;
    transform: scale(1.3);
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--accent-color);
    transform: scale(0.8);
    opacity: 0.7;
    transition: transform 0.3s ease, opacity 0.3s ease, color 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: #fff;
    transform: scale(1);
    opacity: 1;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .content-container h1 {
        font-size: 2.5rem;
    }

    .main-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 300px;
    }

    .btn {
        font-size: var(--btn-size-mobile);
        padding: 10px 20px;
        width: 100%;
    }

    .modal-content {
        padding: 20px;
        width: 92%;
        max-height: 85vh;
        margin: 5vh auto;
    }

    .fullscreen-modal {
        overflow-y: auto;
        height: auto;
        min-height: 70vh;
        max-height: 85vh;
        width: 92%;
    }

    .modal-content h2 {
        font-size: 1.8rem;
        padding: 8px 15px;
    }

    .close-btn {
        top: 8px;
        right: 12px;
        font-size: 28px;
    }

    #vision-carousel,
    #expectations-carousel {
        height: auto;
        min-height: 450px;
        padding-bottom: 45px;
    }

    .swiper-button-next,
    .swiper-button-prev {
        transform: scale(0.7);
    }

    .form-group label {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px;
        font-size: 1rem;
    }

    .form-submit-btn {
        font-size: 1rem;
        padding: 12px;
    }
}

/* --- Contact Form Styles --- */
.contact-form-container {
    margin-bottom: 20px;
    width: 100%;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--accent-color);
    font-weight: 500;
    text-shadow: 0 0 5px var(--glow-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    background-color: rgba(10, 10, 42, 0.7);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    color: var(--text-color);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 247, 255, 0.2);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--glow-color);
    background-color: rgba(10, 10, 42, 0.9);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-submit-btn {
    width: 100%;
    margin-top: 5px;
    background-color: rgba(0, 247, 255, 0.2);
    padding: 8px 15px;
}

.form-submit-btn:hover {
    background-color: var(--accent-color);
}

.form-status {
    margin-top: 10px;
    padding: 8px 10px;
    font-size: 0.95rem;
    min-height: 36px;
    height: auto;
    display: block;
    /* Always use block display */
    transition: opacity 0.3s ease, visibility 0.3s ease;
    /* Add visibility to transition */
}

.form-status.success {
    background-color: rgba(0, 128, 0, 0.2);
    border: 1px solid #00ff00;
    color: #00ff00;
}

.form-status.error {
    background-color: rgba(128, 0, 0, 0.2);
    border: 1px solid #ff0000;
    color: #ff6666;
}

.contact-info {
    margin-top: 10px;
    background-color: rgba(10, 10, 42, 0.5);
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid rgba(0, 247, 255, 0.3);
}

.contact-info p {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

/* --- Responsive Media Queries --- */

/* Desktop (Larger screens) */
@media screen and (min-width: 1200px) {
    .modal-content {
        padding: 40px;
    }

    .fullscreen-modal {
        max-width: 1400px;
        height: 85vh;
    }

    #vision-carousel,
    #expectations-carousel {
        height: calc(100% - 100px);
    }
}

/* Tablet (Medium-sized screens) */
@media screen and (max-width: 1024px) {
    .top-section h1 {
        font-size: var(--h1-size-tablet);
    }

    .btn {
        font-size: var(--btn-size-tablet);
        padding: 10px 24px;
    }

    .modal-content {
        padding: 25px;
        width: 95%;
    }

    .fullscreen-modal {
        height: 80vh;
    }

    .modal-content h2 {
        font-size: var(--h2-size-tablet);
    }

    #vision-carousel,
    #expectations-carousel {
        height: calc(100% - 80px);
    }

    .swiper-slide h3 {
        font-size: 2rem;
    }

    .swiper-slide p {
        font-size: 1.1rem;
    }
}

/* Mobile (Small screens) */
@media screen and (max-width: 768px) {

    /* Prevent scrolling on mobile */
    html,
    body {
        overflow-x: hidden !important;
        overflow-y: hidden !important;
        max-height: 100vh !important;
        height: 100vh !important;
    }

    /* Hide floating sticky notes on small screens to avoid overlap/truncation */
    .sticky-note,
    .course-breakdown-note {
        display: none !important;
    }

    body {
        overflow-y: hidden !important;
        /* Prevent scrolling */
    }

    .content-wrapper {
        padding: 0.5rem 0.75rem 0.25rem;
        /* Further reduced padding */
        min-height: auto !important;
        /* Remove min-height constraint */
        max-height: calc(100vh - 180px);
        /* Limit height to fit footer and game button */
        justify-content: space-between;
        gap: 0.5rem;
        /* Reduced gap */
    }

    .top-section h1 {
        font-size: 2rem;
        /* Reduced from 2.4rem */
        margin-bottom: 0.25rem;
        /* Reduced from 0.75rem */
        margin-top: 0.25rem;
        /* Reduced from 0.75rem */
    }

    .btn {
        font-size: 0.85rem;
        /* Reduced from 0.95rem */
        padding: 8px 16px;
        /* Reduced from 10px 20px */
        white-space: normal;
        /* Allow wrapping to avoid truncation */
        line-height: 1.2;
    }

    .orbital-buttons {
        height: auto;
        min-height: 30vh !important;
        /* Reduced from 45vh */
        max-height: 35vh !important;
        /* Reduced from 55vh */
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.75rem;
        /* Reduced from 1.25rem */
        margin: 0.25rem 0;
        /* Reduced from 0.5rem */
    }

    .btn.left-orbit,
    .btn.right-orbit,
    .btn.bottom-orbit {
        position: static !important;
        transform: none !important;
        margin: 0;
        width: 85%;
        max-width: 250px;
        /* Reduced from 280px */
    }

    .btn.left-orbit:hover,
    .btn.right-orbit:hover,
    .btn.bottom-orbit:hover {
        transform: scale(1.05) !important;
        box-shadow: 0 0 15px var(--glow-color), 0 0 25px var(--glow-color);
    }

    .bottom-section {
        padding: 0.25rem;
        /* Reduced from 0.75rem */
        margin-top: 0;
        margin-bottom: 0.25rem;
        /* Reduced from 0.5rem */
    }

    .btn-secondary {
        font-size: 0.85rem;
        /* Reduced from 0.95rem */
        padding: 8px 16px;
        /* Reduced from 10px 20px */
        width: auto;
        max-width: 220px;
        /* Reduced from 250px */
        margin: 0 auto;
    }

    .footer {
        padding: 5px 0.5rem !important;
        /* Reduced from 0.75rem 1rem */
        width: 100%;
        margin-top: 0;
        position: relative;
        background-color: rgba(10, 10, 42, 0.3);
        backdrop-filter: blur(3px);
        border-top: 1px solid rgba(0, 247, 255, 0.1);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    }

    .copyright {
        font-size: 0.7rem !important;
        /* Reduced for mobile */
        margin-bottom: 3px !important;
        /* Reduced */
    }

    .footer-note {
        font-size: 0.65rem !important;
        /* Reduced for mobile */
        line-height: 1.2 !important;
        /* Tighter */
    }

    .game-button-container {
        padding: 0.25rem 0.5rem !important;
        /* Reduced for mobile */
        margin-bottom: 0.25rem !important;
        /* Reduced */
    }

    .game-button-container .btn {
        font-size: 0.85rem !important;
        /* Reduced for mobile */
        padding: 8px 20px !important;
        /* Reduced */
    }

    .footer-content {
        padding: 0;
    }

    .copyright {
        font-family: 'Courier New', monospace;
        font-size: 0.9rem;
        text-shadow: 0 0 4px rgba(0, 247, 255, 0.2);
        opacity: 0.9;
        margin-bottom: 0.5rem;
    }

    .footer-note {
        font-family: 'Courier New', monospace;
        font-size: 0.85rem;
        opacity: 0.8;
        padding: 0 0.5rem;
        line-height: 1.4;
    }

    .swiper-slide h3 {
        font-size: 1.8rem;
        padding: 10px 15px;
        margin-bottom: 15px;
    }

    .swiper-slide p {
        font-size: 1.1rem;
        padding: 15px;
        line-height: 1.5;
        max-width: 90%;
        margin-top: 10px;
    }

    #expectations-carousel .swiper-slide p {
        font-size: 1rem;
        line-height: 1.5;
        padding: 15px;
    }

    #expectations-carousel .swiper-slide h3 {
        font-size: 1.7rem;
        margin-bottom: 15px;
        padding: 10px 15px;
    }
}

/* Very Small screens (e.g. iPhone SE, etc.) */
@media screen and (max-width: 375px) {

    html,
    body {
        overflow-y: hidden !important;
        max-height: 100vh !important;
        height: 100vh !important;
    }

    .top-section h1 {
        font-size: 1.8rem;
        /* Reduced from 2rem */
        margin-top: 0.25rem;
        /* Reduced from 0.5rem */
        margin-bottom: 0.25rem;
        /* Added */
    }

    .content-wrapper {
        padding: 0.4rem 0.5rem 0.2rem !important;
        max-height: calc(100vh - 160px) !important;
        gap: 0.4rem !important;
    }

    .orbital-buttons {
        min-height: 28vh !important;
        max-height: 32vh !important;
        gap: 0.6rem !important;
        margin: 0.2rem 0 !important;
    }

    .btn {
        font-size: 0.8rem !important;
        padding: 7px 14px !important;
    }

    .footer {
        padding: 4px 0.4rem !important;
    }

    .copyright {
        font-size: 0.65rem !important;
        margin-bottom: 2px !important;
    }

    .footer-note {
        font-size: 0.6rem !important;
    }

    .game-button-container {
        padding: 0.2rem 0.4rem !important;
        margin-bottom: 0.2rem !important;
    }

    .game-button-container .btn {
        font-size: 0.8rem !important;
        padding: 7px 18px !important;
    }

    .btn-secondary {
        font-size: 0.8rem !important;
        padding: 7px 14px !important;
    }

    .college-results-cards-wrapper {
        gap: 10px;
        margin: 8px 0;
        max-height: 65vh;
        padding: 0 2px;
    }

    .college-result-card {
        padding: 10px 8px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .card-label {
        font-size: 0.85rem;
        min-width: 65px;
        max-width: 40%;
    }

    .card-value {
        max-width: 55%;
        font-size: 0.85rem;
    }

    .card-row {
        font-size: 0.85rem;
        margin-bottom: 5px;
        gap: 5px;
    }

    .modal-content {
        padding: 15px;
    }

    .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }

    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }

    /* Footer styles already defined above in this media query */

    .swiper-slide {
        padding: 15px 5px;
    }

    .swiper-slide h3 {
        font-size: 1.6rem;
        padding: 8px 12px;
        margin-bottom: 12px;
    }

    .swiper-slide p {
        font-size: 1rem;
        padding: 10px;
        line-height: 1.4;
        max-width: 95%;
    }

    .highlight-text {
        font-size: 1.1rem !important;
        padding: 10px !important;
        margin: 15px auto !important;
    }

    #expectations-carousel .swiper-slide .highlight-text {
        font-size: 1.1rem !important;
        padding: 10px 12px !important;
        line-height: 1.4 !important;
    }

    .modal-content {
        padding: 15px 10px;
        width: 95%;
    }

    .modal-content h2 {
        font-size: 1.5rem;
        padding: 6px 10px;
        margin-bottom: 15px;
    }
}

/* Add specific styles for medium-small phones */
@media screen and (min-width: 376px) and (max-width: 480px) {

    html,
    body {
        overflow-y: hidden !important;
        max-height: 100vh !important;
        height: 100vh !important;
    }

    .top-section h1 {
        font-size: 1.9rem;
        /* Reduced from 2.2rem */
        margin-bottom: 0.3rem;
        margin-top: 0.3rem;
    }

    .content-wrapper {
        padding: 0.45rem 0.6rem 0.25rem !important;
        max-height: calc(100vh - 170px) !important;
        gap: 0.45rem !important;
    }

    .orbital-buttons {
        min-height: 30vh !important;
        /* Reduced from 48vh */
        max-height: 35vh !important;
        /* Reduced from 58vh */
        gap: 0.7rem !important;
        margin: 0.25rem 0 !important;
    }

    .btn {
        font-size: 0.85rem !important;
        /* Reduced from 0.9rem */
        padding: 8px 15px !important;
    }

    .footer {
        padding: 5px 0.5rem !important;
    }

    .copyright {
        font-size: 0.7rem !important;
        margin-bottom: 3px !important;
    }

    .footer-note {
        font-size: 0.65rem !important;
    }

    .game-button-container {
        padding: 0.25rem 0.5rem !important;
        margin-bottom: 0.25rem !important;
    }

    .game-button-container .btn {
        font-size: 0.85rem !important;
        padding: 8px 20px !important;
    }
}

/* Ensure footer is always visible at bottom but with less vertical space */
@media screen and (max-height: 600px) {
    .content-wrapper {
        padding-bottom: 40px;
        /* Reduced from 60px */
    }

    .footer {
        position: relative;
        bottom: 0;
        padding-bottom: 5px;
        /* Reduced from 10px */
    }
}

/* Fix for mid-sized devices around 412x957 where footer note gets cut off */
@media screen and (width >=400px) and (width <=450px) and (max-height: 1000px) {
    .content-wrapper {
        min-height: calc(100vh - 100px);
        /* Reduced from calc(100vh - 80px) */
        padding-bottom: 30px;
        /* Reduced from 50px */
    }

    .orbital-buttons {
        min-height: 40vh;
        max-height: 50vh;
    }

    .footer {
        padding: 10px 0 12px;
        /* Reduced from 12px 0 16px */
        margin-top: 0;
    }

    .copyright,
    .footer-note {
        opacity: 1;
        margin-bottom: 5px;
    }

    .footer-note {
        font-size: 0.8rem;
        color: var(--text-color);
    }
}

/* --- Sticky Note --- */
.sticky-note {
    position: fixed;
    top: 12vh;
    left: min(5vw, 20px);
    /* Changed from right to left */
    width: clamp(120px, 20vw, 200px);
    height: clamp(150px, 30vh, 220px);
    transform: rotate(-3deg);
    /* Reversed the rotation for better look on left side */
    z-index: 5;
    transition: all 0.3s ease;
    transform-origin: center;
}

.sticky-note:hover {
    transform: rotate(0deg) scale(1.05);
}

.note-content {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 247, 255, 0.2);
    padding: 15px 12px 12px;
    border-radius: 2px 15px 15px 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    color: var(--text-color);
    font-family: 'Montserrat', cursive;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Changed to space-between to push content apart */
    overflow: hidden;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(0, 247, 255, 0.3);
}

.note-content .note-main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.note-content h3 {
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    color: var(--accent-color);
    text-shadow: none;
}

.note-content h3:hover {
    color: #fff;
    /* Change color on hover */
    text-shadow: 0 0 12px var(--glow-color), 0 0 20px var(--glow-color);
    /* Enhanced glow on hover */
    transform: scale(1.02);
    /* Slight scale up on hover */
}

/* Hide the Learn More link since heading will have same functionality */
.note-cta {
    display: none;
}

.note-content p {
    margin-bottom: 3px;
    font-size: 0.8rem;
    text-align: center;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
}

@media screen and (max-width: 768px) {
    .note-content {
        padding: 10px 6px 6px;
    }

    .note-content .note-main-content {
        gap: 3px;
    }

    .note-cta {
        padding-top: 4px;
        font-size: 0.7rem;
    }
}

@media screen and (max-width: 480px) {
    .note-content {
        padding: 8px 5px 5px;
    }

    .note-content .note-main-content {
        gap: 2px;
    }

    .note-cta {
        padding-top: 3px;
        font-size: 0.65rem;
    }
}

@media screen and (max-width: 375px) {
    .note-content .note-main-content {
        gap: 2px;
    }

    .note-cta {
        padding-top: 2px;
        font-size: 0.6rem;
    }
}

/* ID specific styles for the expectations carousel */
#expectations-carousel {
    width: 100%;
    height: calc(100% - 80px);
    min-height: 500px;
    margin-top: 10px;
    /* Reduced margin-top */
    background: transparent;
    padding-bottom: 30px;
    /* Reduced padding */
    overflow: visible;
}

#expectations-carousel .swiper-slide {
    padding-top: 15px;
    /* Reduced top padding to move content up */
}

/* More stylish headings with reduced size and elegant font */
#expectations-carousel .swiper-slide h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 15px;
    /* Reduced margin to move text up */
    padding: 8px 18px;
    background-color: rgba(10, 10, 42, 0.6);
    border-radius: 8px;
    box-shadow: 0 0 12px var(--glow-color);
    text-shadow: 0 0 8px var(--glow-color);
}

/* Adjust text below headings */
#expectations-carousel .swiper-slide p {
    font-size: 1.1rem;
    line-height: 1.5;
    max-width: 85%;
    margin-top: 5px;
    /* Reduced margin to move closer to heading */
    padding: 15px;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    letter-spacing: 0.5px;
    text-align: left;
    /* Maintain left alignment */
    margin-left: auto;
    margin-right: auto;
}

#expectations-carousel .swiper-slide p em,
#expectations-carousel .swiper-slide p strong {
    display: inline-block;
    margin-bottom: 6px;
    /* Slightly reduced from 8px */
}

/* Philosophy statement special styling */
#expectations-carousel .swiper-slide .highlight-text {
    font-size: 1.6rem !important;
    font-weight: 300 !important;
    letter-spacing: 2px !important;
    padding: 18px 22px !important;
    line-height: 1.5 !important;
    font-family: 'Montserrat', sans-serif !important;
    text-align: center !important;
    font-style: italic !important;
    margin-top: 40px !important;
    /* Lower the position */
    text-transform: uppercase !important;
    background-color: rgba(10, 10, 42, 0.5) !important;
    text-shadow: 0 0 15px var(--glow-color), 0 0 25px var(--glow-color), 0 0 35px var(--glow-color) !important;
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    #expectations-carousel {
        min-height: 500px;
    }

    #expectations-carousel .swiper-slide h3 {
        font-size: 1.4rem;
        padding: 6px 14px;
        margin-bottom: 10px;
    }

    #expectations-carousel .swiper-slide p {
        font-size: 0.85rem;
        line-height: 1.4;
        padding: 12px;
    }

    #expectations-carousel .swiper-slide .highlight-text {
        font-size: 1.2rem !important;
        padding: 12px 18px !important;
        letter-spacing: 1.5px !important;
        margin-top: 30px !important;
    }
}

/* Center button container */
.center-button-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    position: relative;
    z-index: 2;
    width: 100%;
}

@media screen and (max-width: 768px) {

    /* On mobile, adjust the vertical spacing */
    .center-button-container {
        padding: 1.5rem 0;
        margin: 1rem 0;
    }
}

/* --- Orbital Buttons --- */
.orbital-buttons {
    position: relative;
    width: 100%;
    height: 40vh;
    /* Reduced from 60vh to fit everything on one page */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    margin: 0.5rem 0;
    /* Add small margin */
}

.btn.left-orbit,
.btn.right-orbit,
.btn.bottom-orbit {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: absolute;
}

.btn.left-orbit {
    position: absolute;
    left: 24%;
    top: 50%;
    transform: translateY(-50%);
}

.btn.left-orbit:hover {
    transform: translateY(-50%) scale(1.1) translateX(-10px);
    box-shadow: 0 0 20px var(--glow-color), 0 0 30px var(--glow-color);
}

.btn.right-orbit {
    right: 20%;
    top: 50%;
    transform: translateY(-50%);
}

.btn.right-orbit:hover {
    transform: translateY(-50%) scale(1.1) translateX(10px);
    box-shadow: 0 0 20px var(--glow-color), 0 0 30px var(--glow-color);
}

.btn.bottom-orbit {
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.btn.bottom-orbit:hover {
    transform: translateX(-50%) scale(1.1) translateY(10px);
    box-shadow: 0 0 20px var(--glow-color), 0 0 30px var(--glow-color);
}

/* Mobile adjustments for orbital buttons */
@media screen and (max-width: 768px) {
    .orbital-buttons {
        height: 45vh;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
    }

    .btn.left-orbit,
    .btn.right-orbit,
    .btn.bottom-orbit {
        position: static !important;
        transform: none !important;
        margin: 10px 0;
        width: 80%;
        max-width: 250px;
    }

    .btn.left-orbit:hover,
    .btn.right-orbit:hover,
    .btn.bottom-orbit:hover {
        transform: scale(1.05) !important;
        box-shadow: 0 0 15px var(--glow-color), 0 0 25px var(--glow-color);
    }
}

/* Very small screens - adjust height only */
@media screen and (max-width: 480px) {
    .orbital-buttons {
        height: 45vh;
        min-height: 280px;
    }
}

@media screen and (max-width: 480px) {
    .swiper-slide h3 {
        font-size: 1.4rem;
        padding: 6px 12px;
    }

    .swiper-slide p {
        font-size: 0.9rem;
        padding: 8px;
        max-width: 95%;
    }

    .modal-content h2 {
        font-size: 1.3rem;
        padding: 8px 12px;
    }
}

/* Highlight text for philosophy statement */
.highlight-text {
    font-size: 1.8rem !important;
    line-height: 1.6 !important;
    font-weight: 500 !important;
    color: var(--accent-color) !important;
    text-shadow: 0 0 15px var(--glow-color), 0 0 25px var(--glow-color) !important;
    background-color: rgba(10, 10, 42, 0.7) !important;
    padding: 20px 25px !important;
    border-radius: 10px !important;
    max-width: 90% !important;
    margin: 0 auto !important;
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.3) !important;
    border: 1px solid var(--accent-color) !important;
    transform: scale(1.05) !important;
}

@media screen and (max-width: 768px) {
    .highlight-text {
        font-size: 1.4rem !important;
        padding: 15px 20px !important;
    }
}

@media screen and (max-width: 480px) {
    .highlight-text {
        font-size: 1.2rem !important;
        padding: 12px 15px !important;
        letter-spacing: 1px !important;
        margin-top: 25px !important;
    }
}

/* Override conflicting styles */
@media screen and (max-width: 768px) {
    .swiper-slide {
        justify-content: flex-start;
        padding-top: 30px;
    }

    .swiper-slide h3 {
        margin-bottom: 15px;
        font-size: 1.6rem;
    }

    .swiper-slide p {
        margin-top: 10px;
        padding: 10px;
    }

    /* Adjust carousel height specifically for expectations carousel */
    #expectations-carousel {
        min-height: 500px;
    }
}

/* For expectations slides, use smaller font sizes to ensure content fits */
#expectations-carousel .swiper-slide p {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 95%;
}

#expectations-carousel .swiper-slide h3 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

@media screen and (max-width: 768px) {
    #expectations-carousel .swiper-slide p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    #expectations-carousel .swiper-slide h3 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    #expectations-carousel {
        min-height: 550px;
        /* Increase height on mobile to fit content */
    }
}

/* Extra small devices with short height */
@media screen and (max-height: 600px) and (max-width: 768px) {
    .orbital-buttons {
        min-height: 35vh;
        max-height: 45vh;
        gap: 0.5rem;
    }

    .btn.left-orbit,
    .btn.right-orbit,
    .btn.bottom-orbit {
        margin: 5px 0;
    }

    .content-wrapper {
        min-height: calc(100vh - 60px);
        /* Increased from 50px */
        gap: 0.5rem;
        padding-bottom: 0.25rem;
        /* Added reduced padding */
    }

    .footer {
        padding: 0.75rem 0.5rem;
    }

    .copyright,
    .footer-note {
        font-size: 0.75rem;
        line-height: 1.3;
    }
}

#custom-form-btn {
    margin-top: 16px;
    display: inline-block;
}

@media (max-width: 600px) {
    .bottom-section {
        padding: 0.75rem;
        gap: 8px;
    }

    .bottom-section .btn {
        max-width: 100%;
        font-size: 1rem;
    }
}

/* More compact college predictor form */
#custom-form-modal .modal-content {
    max-width: 580px;
    /* Increased from 500px */
    padding: 25px 30px;
    /* Increased padding */
    max-height: 90vh;
    /* Increased from 85vh */
}

#custom-form-modal .modal-content.expanded-modal,
#predict-by-college-modal .modal-content.expanded-modal {
    max-width: none !important;
    width: 95vw !important;
    padding: 25px 30px;
    /* Increased padding */
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
}

#custom-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    /* Increased from 12px */
}

#custom-form .form-group {
    margin-bottom: 15px;
    /* Increased from 10px */
}

#custom-form label {
    margin-bottom: 6px;
    /* Increased from 4px */
    font-size: 1rem;
    /* Slightly larger */
}

#custom-form input[type="text"],
#custom-form input[type="number"],
#custom-form input[type="tel"],
#custom-form input[type="email"],
#custom-form select {
    padding: 10px 14px;
    /* Increased padding */
    height: 40px;
    /* Increased from 36px */
    font-size: 1rem;
    /* Slightly larger */
    transition: all 0.2s ease;
    background-color: rgba(10, 10, 42, 0.7);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    color: var(--text-color);
    font-family: var(--font-primary);
    box-shadow: 0 0 5px rgba(0, 247, 255, 0.2);
    width: 100%;
}

#custom-form input:focus,
#custom-form select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--glow-color);
    background-color: rgba(10, 10, 42, 0.9);
}

/* Style for select dropdown arrow */
#custom-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2300f7ff' viewBox='0 0 16 16'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    padding-right: 35px;
}

#custom-form select option {
    background-color: rgba(10, 10, 42, 0.95);
    color: var(--text-color);
    padding: 10px;
}

#custom-form-modal h2 {
    margin-bottom: 20px;
    /* Increased from 15px */
    padding-bottom: 8px;
    /* Increased from 5px */
    font-size: 1.8rem;
    /* Increased from 1.7rem */
}

#custom-form .dropdown-row {
    gap: 18px;
    /* Increased from 12px */
    margin-bottom: 10px;
    /* Increased from 5px */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

#custom-form .form-group.dropdown-half {
    flex: 1 1 45%;
    min-width: 160px;
    /* Increased from 120px for better spacing on small screens */
}

#custom-form .form-submit-btn {
    margin: 15px auto;
    /* Increased from 8px */
    padding: 10px 24px;
    /* Increased from 8px 20px */
    font-size: 1.05rem;
    /* Slightly larger */
}

/* Adjustments for the autocomplete items to prevent them from making the form too tall */
#custom-form .autocomplete-items {
    max-height: 180px;
    /* Increased from 150px */
    position: absolute;
    z-index: 100;
}

/* Remove the overly compact styles that were added before */
/* Make form fields even more compact */
#custom-form-modal h2 {
    margin-bottom: 20px;
    padding-bottom: 8px;
}

/* Make the form group spacing more comfortable */
#custom-form .form-group {
    margin-bottom: 15px;
}

/* Increase the space between rows */
#custom-form .dropdown-row {
    margin-bottom: 10px;
}

/* Make the submit button larger */
#custom-form .form-submit-btn {
    padding: 10px 24px;
    font-size: 1.05rem;
    margin-top: 15px;
}

/* Ensure the form content properly fits but with more comfortable sizing */
@media (max-height: 700px) {
    #custom-form-modal .modal-content {
        padding: 18px 24px;
        /* Increased from 12px */
    }

    #custom-form-modal h2 {
        font-size: 1.6rem;
        /* Increased from 1.4rem */
        margin-bottom: 12px;
        /* Increased from 6px */
    }

    #custom-form input[type="text"],
    #custom-form input[type="number"],
    #custom-form input[type="tel"],
    #custom-form input[type="email"],
    #custom-form select {
        height: 36px;
        /* Increased from 28px */
        padding: 8px 12px;
        /* Increased from 4px 8px */
    }
}

/* Additional responsive adjustments for very large screens */
@media (min-width: 1200px) {
    #custom-form-modal .modal-content {
        max-width: 650px;
        /* Even larger on big screens */
        padding: 30px 35px;
    }

    #custom-form {
        gap: 20px;
    }

    #custom-form .form-group {
        margin-bottom: 18px;
    }
}

/* Adjustments for small mobile screens */
@media (max-width: 480px) {
    #custom-form-modal .modal-content {
        padding: 18px 20px;
    }

    #custom-form .dropdown-row {
        gap: 12px;
    }

    #custom-form .form-group.dropdown-half {
        min-width: 140px;
    }
}

.loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--accent-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.custom-results-table th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: capitalize;
    background-color: rgba(0, 247, 255, 0.05);
}


.custom-results-table td {
    white-space: normal;
}

/* Optional: Make Percentile column more readable */
/* .custom-results-table th:nth-child(5),
  .custom-results-table td:nth-child(5) {
    min-width: 90px;
    text-align: right;
  } */


.autocomplete-wrapper {
    position: relative;
}

.autocomplete-items {
    position: absolute;
    border: 1px solid var(--accent-color);
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background-color: rgba(15, 15, 60, 0.95);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.autocomplete-items div {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 247, 255, 0.2);
    transition: background-color 0.2s;
}

.autocomplete-items div:hover {
    background-color: rgba(0, 247, 255, 0.15);
}

.custom-results-table {
    table-layout: auto;
    width: 100%;
}

/* Table wrapper to enable sticky headers */
#table-for-pdf {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid rgba(0, 247, 255, 0.3);
    border-radius: 8px;
}

/* Custom scrollbar styling for table */
#table-for-pdf::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#table-for-pdf::-webkit-scrollbar-track {
    background: rgba(10, 10, 42, 0.3);
    border-radius: 4px;
}

#table-for-pdf::-webkit-scrollbar-thumb {
    background: rgba(0, 247, 255, 0.6);
    border-radius: 4px;
}

#table-for-pdf::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 247, 255, 0.8);
}

.custom-results-table th,
.custom-results-table td {
    white-space: nowrap;
    /* ✅ Keep text in one line */
    text-align: left;
    vertical-align: top;
}

.custom-results-table th {
    font-weight: 600;
    color: var(--accent-color);
    position: sticky;
    top: 0;
    background-color: rgba(10, 10, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 247, 255, 0.2);
}

.custom-results-table td {
    color: var(--text-color);
}

/* 💡 Ensure important columns are wide enough */
.custom-results-table th:nth-child(2),
.custom-results-table td:nth-child(2) {
    min-width: 200px;
    /* Reduced from 300px */
    max-width: 250px;
    /* Added max-width */
    white-space: normal;
    word-wrap: break-word;
    /* Added word wrapping */
}

.custom-results-table th:nth-child(3),
.custom-results-table td:nth-child(3) {
    min-width: 150px;
    /* Branch Name */
    white-space: normal;
    /* Changed from nowrap to normal to wrap text */
}

.custom-results-table th:nth-child(6),
.custom-results-table td:nth-child(6) {
    min-width: 100px;
    /* Category */
    white-space: nowrap;
}

.custom-results-table th:nth-child(8),
.custom-results-table td:nth-child(8) {
    min-width: 120px;
    /* Percentile */
    white-space: nowrap;
}

/* Style for branch name cells to ensure text wrapping */
.branch-name-cell {
    white-space: normal !important;
    /* Force text wrapping */
    max-width: 200px;
    /* Limit maximum width */
    word-wrap: break-word;
    /* Allow word breaking for very long terms */
}

/* Style for college name cells to ensure text wrapping */
.college-name-cell {
    white-space: normal !important;
    /* Force text wrapping */
    max-width: 250px;
    /* Limit maximum width */
    word-wrap: break-word;
    /* Allow word breaking for very long terms */
}

/* Button pulse animation for form resubmission */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 247, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 247, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 247, 255, 0);
    }
}

.pulse-animation {
    animation: pulse 1.5s ease-in-out infinite;
}

.download-pdf-btn {
    display: none;
}

.download-pdf-btn:hover {
    display: none;
}

.download-pdf-btn .icon {
    display: none;
}

#contact-modal {
    align-items: flex-start;
    padding-top: 7vh;
}

#contact-modal .modal-content {
    width: 85%;
    max-width: 500px;
    padding: 20px 25px 15px;
    max-height: none;
    overflow-y: visible;
}

#contact-modal .modal-content h2 {
    margin-bottom: 12px;
    font-size: 1.7rem;
}

#contact-modal .form-group {
    margin-bottom: 12px;
}

#contact-modal .form-group textarea {
    min-height: 65px;
}

#contact-modal .contact-info {
    margin-bottom: 8px;
    padding: 5px 10px;
    background-color: rgba(10, 10, 42, 0.3);
    border-width: 1px 0;
    border-radius: 0;
}

#contact-modal .contact-info p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

#contact-modal .form-status {
    margin-top: 5px;
    padding: 5px 8px;
    min-height: 30px;
}

@media screen and (max-width: 768px) {
    #contact-modal {
        padding-top: 8vh;
    }

    #contact-modal .modal-content {
        width: 90%;
        padding: 18px 20px 12px;
    }

    #contact-modal .modal-content h2 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    #contact-modal .form-group {
        margin-bottom: 10px;
    }

    #contact-modal .form-group textarea {
        min-height: 60px;
    }
}

@media screen and (max-width: 480px) {
    #contact-modal {
        padding-top: 6vh;
    }

    #contact-modal .modal-content {
        width: 92%;
        padding: 15px 18px 10px;
    }

    #contact-modal .modal-content h2 {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }

    /* Enhanced modal handling for cards on very small screens */
    #custom-form-modal .modal-content.expanded-modal,
    #predict-by-college-modal .modal-content.expanded-modal {
        width: 96vw !important;
        max-width: 96vw !important;
        height: auto !important;
        max-height: 88vh !important;
        overflow-y: auto !important;
        padding: 12px !important;
    }

    .college-results-cards-wrapper {
        max-height: 75vh !important;
    }
}

#contact-modal .form-submit-btn {
    margin-top: 2px;
    padding: 7px 15px;
}

#contact-modal.curriculum-download {
    padding-top: 2vh;
}

/* Special case for when curriculum prompt is visible */
#contact-modal .curriculum-prompt+form .form-group textarea {
    min-height: 40px;
    max-height: 70px;
    padding: 5px 8px;
}

#contact-modal .curriculum-prompt+form .form-group {
    margin-bottom: 6px;
}

#contact-modal.curriculum-download .curriculum-prompt {
    padding: 6px 10px;
    margin-bottom: 8px;
}

#contact-modal.curriculum-download .curriculum-prompt h4 {
    font-size: 1rem;
}

#contact-modal.curriculum-download .curriculum-prompt p {
    font-size: 0.8rem;
}

#contact-modal.curriculum-download .contact-info {
    margin-bottom: 6px;
    padding: 4px 8px;
}

#contact-modal.curriculum-download .form-group label {
    margin-bottom: 3px;
}

/* Ensure the form is scrollable if needed, just for the curriculum case */
#contact-modal .contact-form-container {
    max-height: 75vh;
    overflow-y: auto;
    padding-right: 5px;
    padding-bottom: 5px;
}

/* Only show scrollbar when needed */
#contact-modal .contact-form-container::-webkit-scrollbar {
    width: 5px;
}

#contact-modal .contact-form-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 247, 255, 0.3);
    border-radius: 5px;
}

#contact-modal.curriculum-download .form-group textarea {
    min-height: 35px;
    max-height: 60px;
    padding: 4px 8px;
    font-size: 0.9rem;
}

/* Add a subtle scrollbar to the textarea if needed */
#contact-modal.curriculum-download .form-group textarea::-webkit-scrollbar {
    width: 4px;
}

#contact-modal.curriculum-download .form-group textarea::-webkit-scrollbar-thumb {
    background-color: rgba(0, 247, 255, 0.2);
    border-radius: 4px;
}

/* Further reduce submit button */
#contact-modal.curriculum-download .form-submit-btn {
    background-color: rgba(0, 247, 255, 0.3);
    padding: 6px 15px;
    /* Further reduced from 7px to 6px */
    margin-top: 3px;
    margin-bottom: 3px;
    border-radius: 30px;
    font-size: 0.95rem;
    /* Further reduced from 1rem to 0.95rem */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* Reduced from 1px to 0.5px */
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    animation: button-pulse 2s infinite;
    height: auto;
    line-height: 1.1;
    /* Reduced from 1.2 to 1.1 */
}

@keyframes button-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 247, 255, 0.5);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 247, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 247, 255, 0);
    }
}

/* Ensure curriculum form has good spacing */
#contact-modal.curriculum-download .contact-form-container {
    padding-bottom: 5px;
    /* Reduced from 10px to 5px */
}

/* Make curriculum form more compact */
#contact-modal.curriculum-download .form-group {
    margin-bottom: 6px;
    /* Already reduced above */
}

#contact-modal.curriculum-download .modal-content {
    padding-bottom: 20px;
    min-height: auto;
    max-height: 90vh;
    margin: 0 auto;
}

#contact-modal.curriculum-download .form-group input {
    height: 38px;
    padding: 6px 10px;
}

/* Reduce whitespace around form elements */
#contact-modal.curriculum-download .form-group:last-child {
    margin-bottom: 0;
}

/* Course Breakdown Note - position it lower */
.course-breakdown-note {
    position: fixed;
    top: 40vh;
    /* Moved down from 25vh to 40vh (lower half of the screen) */
    right: min(5vw, 20px);
    width: clamp(180px, 25vw, 260px);
    height: clamp(220px, 35vh, 300px);
    transform: rotate(2deg);
    z-index: 5;
    transition: all 0.3s ease;
    transform-origin: center;
}

.course-breakdown-note:hover {
    transform: rotate(0deg) scale(1.05);
}

.course-breakdown-note .note-content {
    padding: 25px 15px 15px;
    /* Increased padding */
    background-color: rgba(0, 150, 255, 0.2);
    border: 1px solid rgba(0, 150, 255, 0.3);
}

.course-breakdown-note .note-content::before {
    border-color: rgba(0, 150, 255, 0.3) transparent;
}

.course-breakdown-note .pin {
    background-color: #33ccff;
    /* Different pin color */
}

.course-breakdown-note .note-content h3 {
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--glow-color);
}

/* Specific styles for course breakdown note heading to make it clickable */
.course-breakdown-note .note-content h3 {
    cursor: pointer;
    transition: all 0.3s ease;
}

.course-breakdown-note .note-content h3:hover {
    color: #fff;
    text-shadow: 0 0 12px var(--glow-color), 0 0 20px var(--glow-color);
    transform: scale(1.02);
}

/* Hide the Learn More link since heading will have same functionality */
.course-breakdown-note .note-cta {
    display: none;
}

/* Course Modal Styles - 3D Coverflow */
#course-modal .modal-content.course-coverflow-modal {
    max-width: 900px;
    width: 92%;
    padding: 30px 20px 50px 20px;
    margin: 3vh auto;
    border-radius: 20px;
    max-height: 95vh;
    overflow: visible;
    position: relative;
    /* Establish stacking context */
}

/* Ensure close button is fully clickable in course modal */
#course-modal .close-btn {
    z-index: 10001 !important;
    /* Above everything including carousel arrows */
    pointer-events: auto !important;
}

.coverflow-main-title {
    color: var(--accent-color);
    font-size: 2rem;
    margin-top: -15px;
    margin-bottom: 50px;
    text-align: center;
    font-weight: 600;
    text-shadow: 0 0 10px var(--glow-color);
    position: relative;
    z-index: 150;
    pointer-events: none;
    /* Don't block clicks on close button */
}

/* Coverflow Container */
.coverflow-container {
    position: relative;
    width: 100%;
    height: 900px;
    /* increased height to show full content */
    overflow: visible;
}

/* Carousel Navigation Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 247, 255, 0.15);
    border: 2px solid rgba(0, 247, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.carousel-arrow svg {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    background: rgba(0, 247, 255, 0.3);
    border-color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px var(--glow-color);
}

.carousel-arrow:hover svg {
    color: #fff;
}

.carousel-arrow-left {
    left: 10%;
}

.carousel-arrow-right {
    right: 10%;
}

/* Arrows are always active for infinite loop */
.carousel-arrow-left,
.carousel-arrow-right {
    opacity: 1;
    pointer-events: auto;
}

.wgh-slider {
    position: relative;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
}

.wgh-slider__viewport {
    position: relative;
    height: 100%;
    width: 100%;
}

.wgh-slider__viewbox {
    display: block;
    position: relative;
    perspective: 150vw;
    margin: -40px auto 0 auto;
    width: 60%;
    max-width: 550px;
    transform-style: preserve-3d;
    z-index: 0;
}

.wgh-slider__viewbox::before {
    position: relative;
    top: 0;
    left: 0;
    display: block;
    content: "";
    height: 0;
    padding-bottom: 75%;
    width: 100%;
}

.wgh-slider__container {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    transition: transform 0.4s cubic-bezier(0.62, 0.28, 0.23, 0.99) 0.2s;
    transform-style: preserve-3d;
}

.wgh-slider-target {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    visibility: hidden;
}

input.wgh-slider-target {
    display: none;
}

/* Slide positioning - Disabled for circular carousel */
/* #slide-1:checked ~ .wgh-slider__viewport .wgh-slider__container {
    transform: translateX(0%);
}

#slide-2:checked ~ .wgh-slider__viewport .wgh-slider__container {
    transform: translateX(-50%);
}

#slide-3:checked ~ .wgh-slider__viewport .wgh-slider__container {
    transform: translateX(-100%);
} */

.wgh-slider-item {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
    transform: translate3d(0, 0, 0) rotateY(55deg);
    transition: all 0.5s cubic-bezier(0.62, 0.28, 0.23, 0.99) 0.1s;
}

.wgh-slider-item:nth-child(1) {
    left: -10%;
    transform: translate3d(-50%, -15%, 0) rotateY(55deg);
}

.wgh-slider-item:nth-child(2) {
    left: 50%;
    transform: translate3d(-50%, -15%, 0) rotateY(0deg);
}

.wgh-slider-item:nth-child(3) {
    left: 110%;
    transform: translate3d(-50%, -15%, 0) rotateY(-55deg);
}

.wgh-slider-item__trigger {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    cursor: pointer;
}

/* Hide trigger on active slide */
#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) .wgh-slider-item__trigger,
#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) .wgh-slider-item__trigger,
#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) .wgh-slider-item__trigger {
    display: none;
}

.wgh-slider-item__inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-origin: center center;
    transform: scale(0.7);
    transition: all 0.4s cubic-bezier(0.62, 0.28, 0.23, 0.99) 0s;
    z-index: 10;
}

.wgh-slider-item__inner::before {
    display: block;
    position: absolute;
    content: "";
    top: 20px;
    left: 20px;
    bottom: 20px;
    right: 20px;
    z-index: 0;
    transition: transform 0.3s cubic-bezier(0.62, 0.28, 0.23, 0.99) 0.15s;
    transform: translate(-20px, 10px);
    box-shadow: 0 14px 28px rgba(0, 247, 255, 0.25), 0 10px 10px rgba(0, 247, 255, 0.22);
}

/* Active slide styles */
#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) .wgh-slider-item__inner,
#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) .wgh-slider-item__inner,
#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) .wgh-slider-item__inner {
    transform: scale(1.05);
    transition-delay: 0.4s;
}

#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) .wgh-slider-item__inner::before,
#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) .wgh-slider-item__inner::before,
#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) .wgh-slider-item__inner::before {
    transform: translate(0, 20px);
}

#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3)~.wgh-slider-item .wgh-slider-item__inner::before,
#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2)~.wgh-slider-item .wgh-slider-item__inner::before,
#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1)~.wgh-slider-item .wgh-slider-item__inner::before {
    transform: translate(20px, 10px);
}

/* Course Card Content */
.course-card-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 10, 42, 0.95), rgba(10, 10, 42, 0.85));
    border: 2px solid rgba(0, 247, 255, 0.4);
    border-radius: 15px;
    padding: 25px 20px 20px 20px;
    overflow-y: auto;
    /* Allow scroll with visible scrollbar */
    overflow-x: hidden;
    /* No horizontal scroll */
    z-index: 2;
    backdrop-filter: blur(10px);
    /* Custom scrollbar styling for Firefox */
    scrollbar-width: auto;
    scrollbar-color: rgba(0, 247, 255, 0.8) rgba(0, 247, 255, 0.15);
}

/* Custom scrollbar styling for Chrome, Safari and Opera */
.course-card-content::-webkit-scrollbar {
    width: 12px;
}

.course-card-content::-webkit-scrollbar-track {
    background: rgba(0, 247, 255, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(0, 247, 255, 0.2);
}

.course-card-content::-webkit-scrollbar-thumb {
    background: rgba(0, 247, 255, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(0, 247, 255, 0.9);
    box-shadow: 0 0 6px rgba(0, 247, 255, 0.5);
}

.course-card-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 247, 255, 0.9);
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.8);
}

.card-title {
    color: var(--accent-color);
    font-size: 1.25rem;
    margin-bottom: 8px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 0 8px var(--glow-color);
}

.card-description {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 12px;
    text-align: center;
}

.card-topics {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.card-topics li {
    color: var(--text-color);
    font-size: 0.95rem;
    padding: 7px 14px;
    margin-bottom: 5px;
    background-color: rgba(0, 247, 255, 0.08);
    border-left: 3px solid var(--accent-color);
    border-radius: 6px;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.card-topics li:hover {
    background-color: rgba(0, 247, 255, 0.15);
    transform: translateX(5px);
}

/* Circular repositioning - When Slide 1 is active */
#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) {
    left: 50% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(0deg);
    z-index: 9999;
    opacity: 1;
}

#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) {
    left: 110% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(-55deg);
}

#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) {
    left: -10% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(55deg);
}

/* Circular repositioning - When Slide 2 is active */
#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) {
    left: 50% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(0deg);
    z-index: 9999;
    opacity: 1;
}

#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) {
    left: 110% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(-55deg);
}

#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) {
    left: -10% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(55deg);
}

/* Circular repositioning - When Slide 3 is active */
#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) {
    left: 50% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(0deg);
    z-index: 9999;
    opacity: 1;
}

#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) {
    left: 110% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(-55deg);
}

#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) {
    left: -10% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(55deg);
}

/* Hide content on non-active cards */
.wgh-slider-item .card-description,
.wgh-slider-item .card-topics {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) .card-description,
#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) .card-topics,
#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) .card-description,
#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) .card-topics,
#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) .card-description,
#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) .card-topics {
    opacity: 1;
}

/* Responsive */
@media screen and (max-width: 768px) {
    #course-modal .modal-content.course-coverflow-modal {
        width: 95%;
        padding: 16px 12px 24px 12px;
        /* tighter padding to free vertical space */
        max-height: 75vh;
        /* reduced to compensate for top margin */
        margin: 18vh auto 3vh auto;
        /* increased top margin to reveal middle layer heading */
    }

    .coverflow-main-title {
        font-size: 1.6rem;
        margin-top: -10px;
        margin-bottom: 35px;
    }

    .coverflow-container {
        height: 72vh;
        /* reserve space for title/close buttons */
    }

    .wgh-slider__viewbox {
        width: 90%;
        max-width: 600px;
        margin: 80px auto 0 auto;
        /* further increased to push cards down */
        height: 55vh;
        /* reduced card height */
        max-height: 55vh;
    }

    /* Disable aspect-ratio box and use explicit height instead */
    .wgh-slider__viewbox::before {
        display: none;
    }

    /* Remove vertical centering that wastes space on small screens */
    .wgh-slider {
        top: 0;
        transform: none;
    }

    /* Slightly reduce card scale so it fits inside carousel on mobile */
    .wgh-slider-item__inner {
        transform: scale(0.64);
    }

    #slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) .wgh-slider-item__inner,
    #slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) .wgh-slider-item__inner,
    #slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) .wgh-slider-item__inner {
        transform: scale(0.92);
    }

    .card-title {
        font-size: 1.05rem;
        margin-bottom: 8px;
        line-height: 1.2;
        white-space: normal;
        word-break: break-word;
    }

    .card-description {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 15px;
    }

    .course-card-content {
        padding: 16px 10px 14px 10px;
        overflow: visible;
        /* show all items without inner scroll */
    }

    .card-title {
        font-size: 1.0rem;
        margin-bottom: 6px;
        line-height: 1.2;
        word-break: break-word;
    }

    .card-description {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }

    .card-topics li {
        font-size: 0.9rem;
        padding: 8px 10px;
        margin-bottom: 6px;
        line-height: 1.3;
    }

    .carousel-arrow {
        width: 40px;
        height: 40px;
    }

    .carousel-arrow svg {
        width: 20px;
        height: 20px;
    }

    .carousel-arrow-left {
        left: 5%;
    }

    .carousel-arrow-right {
        right: 5%;
    }
}

/* Extra-tight layout for very small phones or short heights */
@media screen and (max-width: 420px),
screen and (max-height: 740px) {
    .coverflow-container {
        height: 74vh;
    }

    .wgh-slider__viewbox {
        width: 92%;
        max-width: 580px;
        margin: 48px auto 0 auto;
        height: 56vh;
        max-height: 56vh;
    }

    .wgh-slider__viewbox::before {
        display: none;
    }

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

    .card-topics li {
        font-size: 0.85rem;
        padding: 6px 8px;
        margin-bottom: 6px;
    }

    /* Extra-tight scaling on very small screens */
    .wgh-slider-item__inner {
        transform: scale(0.6);
    }

    #slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) .wgh-slider-item__inner,
    #slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) .wgh-slider-item__inner,
    #slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) .wgh-slider-item__inner {
        transform: scale(0.88);
    }
}

@media screen and (max-width: 480px) {
    #course-modal .modal-content.course-coverflow-modal {
        padding: 15px 10px 35px 10px;
        margin: 15vh auto 2vh auto;
        /* increased top margin to reveal middle layer heading */
    }

    .coverflow-container {
        height: 720px;
        overflow: visible;
    }

    .wgh-slider__viewbox {
        width: 85%;
        max-width: 400px;
        margin: -20px auto 0 auto;
    }

    .course-card-content {
        padding: 25px 20px 20px 20px;
        overflow-y: auto;
        scrollbar-width: auto;
        scrollbar-color: rgba(0, 247, 255, 0.8) rgba(0, 247, 255, 0.15);
    }

    .course-card-content::-webkit-scrollbar {
        width: 10px;
    }

    .course-card-content::-webkit-scrollbar-track {
        background: rgba(0, 247, 255, 0.15);
        border-radius: 8px;
        border: 1px solid rgba(0, 247, 255, 0.2);
    }

    .course-card-content::-webkit-scrollbar-thumb {
        background: rgba(0, 247, 255, 0.7);
        border-radius: 8px;
        border: 1px solid rgba(0, 247, 255, 0.9);
        box-shadow: 0 0 5px rgba(0, 247, 255, 0.5);
    }

    .course-card-content::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 247, 255, 0.9);
        box-shadow: 0 0 8px rgba(0, 247, 255, 0.8);
    }

    .card-title {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .card-description {
        font-size: 0.95rem;
        line-height: 1.45;
        margin-bottom: 15px;
    }

    .card-topics li {
        font-size: 0.9rem;
        padding: 9px 10px;
        margin-bottom: 7px;
        line-height: 1.4;
    }

    .carousel-arrow {
        width: 35px;
        height: 35px;
    }

    .carousel-arrow svg {
        width: 18px;
        height: 18px;
    }

    .carousel-arrow-left {
        left: 2%;
    }

    .carousel-arrow-right {
        right: 2%;
    }
}

#course-modal #modal-title {
    color: var(--accent-color);
    font-size: 1.9rem;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}

#course-modal #modal-description {
    color: var(--text-color);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
}

#course-modal #modal-modules {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

#course-modal #modal-modules li {
    color: var(--text-color);
    font-size: 1rem;
    padding: 10px 15px;
    margin-bottom: 8px;
    background-color: rgba(0, 247, 255, 0.05);
    border-left: 3px solid var(--accent-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

#course-modal #modal-modules li:hover {
    background-color: rgba(0, 247, 255, 0.1);
    transform: translateX(5px);
}

#course-modal #modal-duration {
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin-top: 15px;
}

@media screen and (max-width: 768px) {
    #course-modal .modal-content {
        padding: 25px 20px;
        max-width: 90%;
    }

    #course-modal #modal-title {
        font-size: 1.6rem;
    }

    #course-modal #modal-description {
        font-size: 0.95rem;
    }

    #course-modal #modal-modules li {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}

@media screen and (max-width: 480px) {
    #course-modal .modal-content {
        padding: 20px 15px;
    }

    #course-modal #modal-title {
        font-size: 1.4rem;
    }

    #course-modal #modal-description {
        font-size: 0.9rem;
    }

    #course-modal #modal-modules li {
        font-size: 0.85rem;
        padding: 7px 10px;
    }

    #course-modal #modal-duration {
        font-size: 1rem;
    }
}

.course-breakdown-note .note-content p {
    margin-bottom: 5px;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.3;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
}

.course-breakdown-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    text-align: center;
}

.course-breakdown-list li {
    margin-bottom: 8px;
    /* More space between items */
    font-size: 1rem;
    /* Slightly larger text */
    line-height: 1.3;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
}

.course-days {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.3rem;
    /* Larger numbers */
    text-shadow: 0 0 8px var(--glow-color);
    margin-right: 5px;
    /* Add spacing after the number */
}

/* Responsive adjustments for course breakdown note */
@media screen and (max-width: 768px) {
    .course-breakdown-note {
        width: clamp(150px, 30vw, 200px);
        min-height: 180px;
        height: auto;
        max-height: 60vh;
        top: 35vh;
        right: min(3vw, 10px);
    }

    .course-breakdown-note .note-content {
        padding: 10px 6px 6px;
        overflow-y: auto;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        height: 100%;
    }

    .course-breakdown-note .note-cta {
        font-size: 0.75rem;
        margin-top: auto;
    }

    .course-breakdown-note .note-content h3 {
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .course-breakdown-note {
        width: clamp(130px, 35vw, 170px);
        min-height: 150px;
        height: auto;
        max-height: 70vh;
        top: 32vh;
        right: min(2vw, 8px);
    }

    .course-breakdown-note .note-content {
        padding: 7px 4px 4px;
        font-size: 0.7rem;
    }

    .course-breakdown-list li {
        font-size: 0.7rem;
        margin-bottom: 4px;
    }

    .course-days {
        font-size: 0.85rem;
    }

    .course-breakdown-note .note-content h3 {
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 375px) {
    .course-breakdown-note {
        width: 120px;
        min-height: 120px;
        height: auto;
        max-height: 80vh;
        top: 280px;
        right: 5px;
    }

    .course-breakdown-note .note-content {
        padding: 4px 2px 2px;
        font-size: 0.6rem;
    }

    .course-breakdown-list li {
        font-size: 0.6rem;
        margin-bottom: 2px;
    }

    .course-breakdown-note .note-cta {
        font-size: 0.6rem;
        margin-top: auto;
    }
}

/* Styling for the Quick Start Course Modal */
.quick-start-details {
    padding: 10px 5px;
}

.quick-start-details h3 {
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-shadow: 0 0 8px var(--glow-color);
}

.course-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(10, 10, 42, 0.5);
    border-radius: 5px;
    border-left: 3px solid var(--accent-color);
}

.course-section h4 {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.highlight-days {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--glow-color);
}

.course-section ul {
    padding-left: 20px;
}

.course-section li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.course-benefits {
    margin-top: 25px;
    padding: 15px;
    background-color: rgba(0, 150, 255, 0.1);
    border-radius: 5px;
    text-align: center;
}

.course-benefits h4 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.course-benefits p {
    margin-bottom: 15px;
    line-height: 1.5;
}

.quick-start-cta {
    background-color: rgba(0, 247, 255, 0.2);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 10px 20px;
    margin-top: 15px;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px var(--glow-color);
}

.quick-start-cta:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color), 0 0 30px var(--glow-color);
}

@media screen and (max-width: 768px) {
    .quick-start-details h3 {
        font-size: 1.3rem;
    }

    .course-section h4 {
        font-size: 1.1rem;
    }

    .highlight-days {
        font-size: 1.2rem;
    }

    .course-benefits h4 {
        font-size: 1.2rem;
    }

    .quick-start-cta {
        font-size: 1rem;
        padding: 8px 16px;
    }
}

/* Style for college name cells to ensure text wrapping */
.college-name-cell {
    white-space: normal !important;
    /* Force text wrapping */
    max-width: 250px;
    /* Limit maximum width */
    word-wrap: break-word;
    /* Allow word breaking for very long terms */
}

/* Mobile responsive table styles */
@media screen and (max-width: 768px) {

    /* Convert table to a more mobile-friendly format */
    #custom-form-table-modal {
        overflow-x: auto;
        /* Allow horizontal scrolling instead of squeezing */
        -webkit-overflow-scrolling: touch;
    }

    /* Apply same to the other table modal if used */
    #predict-by-college-table-modal {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .custom-results-table {
        width: 100%;
        table-layout: fixed;
        /* Fixed layout for predictable sizing */
        font-size: 0.85rem;
        /* Smaller font on mobile */
        border-collapse: collapse;
    }

    .custom-results-table th,
    .custom-results-table td {
        padding: 4px 3px !important;
        /* Minimal padding */
        font-size: 0.85rem;
        /* Smaller text */
        white-space: normal !important;
        word-break: break-word;
        /* Break words if needed */
        overflow: visible;
        /* Show full wrapped content */
        text-overflow: clip;
        /* No ellipsis on mobile */
    }

    /* Adjust column widths to fit all on mobile screen */
    .custom-results-table th:nth-child(1),
    /* college_code */
    .custom-results-table td:nth-child(1) {
        width: 12%;
        /* Very narrow for codes */
    }

    .custom-results-table th:nth-child(2),
    /* college_name */
    .custom-results-table td:nth-child(2) {
        width: 35%;
        /* More space for college name */
    }

    .custom-results-table th:nth-child(3),
    /* branch_name */
    .custom-results-table td:nth-child(3) {
        width: 30%;
        /* Moderate space for branch */
    }

    .custom-results-table th:nth-child(4),
    /* rank */
    .custom-results-table td:nth-child(4) {
        width: 10%;
        /* Minimal space for rank */
        text-align: center;
    }

    .custom-results-table th:nth-child(5),
    /* percentile */
    .custom-results-table td:nth-child(5) {
        width: 13%;
        /* Just enough for percentile */
        text-align: center;
    }

    /* Add a bit more breathing room between rows */
    .custom-results-table tr {
        border-bottom: 1px solid rgba(0, 247, 255, 0.2);
    }

    /* Make column headers more readable */
    .custom-results-table th {
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0px;
    }
}

/* Extra small devices */
@media screen and (max-width: 480px) {

    /* Hide original header text and show custom labels for MHTCET */
    .custom-results-table.mhtcet-table th {
        font-size: 0;
    }

    .custom-results-table.mhtcet-table th:after {
        font-size: 0.75rem;
    }

    .custom-results-table.mhtcet-table th:nth-child(1):after {
        content: 'College';
        display: block;
    }

    .custom-results-table.mhtcet-table th:nth-child(2):after {
        content: 'Branch';
        display: block;
    }

    .custom-results-table.mhtcet-table th:nth-child(3):after {
        content: 'Category';
        display: block;
    }

    .custom-results-table.mhtcet-table th:nth-child(4):after {
        content: 'Rank';
        display: block;
    }

    .custom-results-table.mhtcet-table th:nth-child(5):after {
        content: 'Percent';
        display: block;
    }

    /* Hide original header text and show custom labels for JEE */
    .custom-results-table.jee-table th {
        font-size: 0;
    }

    .custom-results-table.jee-table th:after {
        font-size: 0.75rem;
    }

    .custom-results-table.jee-table th:nth-child(1):after {
        content: 'College';
        display: block;
    }

    .custom-results-table.jee-table th:nth-child(2):after {
        content: 'Branch';
        display: block;
    }

    .custom-results-table.jee-table th:nth-child(3):after {
        content: 'Rank';
        display: block;
    }

    .custom-results-table.jee-table th:nth-child(4):after {
        content: 'Percent';
        display: block;
    }


    /* Hide the original header text */
    .custom-results-table th {
        font-size: 0;
    }

    /* But show the after content */
    .custom-results-table th:after {
        font-size: 0.75rem;
    }

    /* Make sure the close button is always visible */
    #close-custom-table,
    #close-predict-by-college-table {
        position: fixed !important;
        top: 10px !important;
        right: 10px !important;
        z-index: 1000 !important;
        background-color: rgba(10, 10, 42, 0.8) !important;
        border-radius: 50% !important;
        padding: 5px 10px !important;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important;
    }
}

/* Mobile adjustments for expanded modal */
@media screen and (max-width: 768px) {

    #custom-form-modal .modal-content.expanded-modal,
    #predict-by-college-modal .modal-content.expanded-modal,
    #custom-form-table-modal,
    #predict-by-college-table-modal {
        padding: 15px !important;
        /* Reduced padding on mobile */
        width: 98vw !important;
        /* Almost full width */
        max-width: 98vw !important;
        /* Ensure it doesn't exceed viewport width */
        height: auto !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }

    /* Make modal content take more of the screen */
    #custom-form-table-modal,
    #predict-by-college-table-modal {
        max-width: 100%;
        width: 100%;
    }

    /* Make mobile table header text smaller */
    #custom-form-table-modal h3,
    #predict-by-college-table-modal h3 {
        font-size: 1.2rem !important;
        margin-bottom: 8px !important;
    }

    /* Adjust table wrapper height on mobile */
    #table-for-pdf {
        max-height: 60vh;
        border-radius: 6px;
    }

    /* Ensure sticky headers work on mobile */
    .custom-results-table th {
        background-color: rgba(10, 10, 42, 0.98) !important;
        backdrop-filter: blur(15px);
    }

    /* Make user info header more compact */
    #custom-form-table-modal h4,
    #predict-by-college-table-modal h4 {
        font-size: 0.9rem !important;
        margin-bottom: 10px !important;
        line-height: 1.3 !important;
    }

    /* Adjust close button position */
    #close-custom-table,
    #close-predict-by-college-table {
        top: -5px !important;
        right: -5px !important;
    }

    /* Remove scroll indicators since we're not scrolling horizontally anymore */
    /* Add scroll indicator for tables that might need horizontal scrolling */
    #table-for-pdf::after {
        display: none;
    }

    /* Show gradient when scrollable */
    #table-for-pdf.is-scrollable::after {
        display: none;
    }
}

/* College Predictor Results Card Style for Mobile */
.college-results-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 12px 0;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 4px;
    /* Custom scrollbar for webkit browsers */
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) rgba(10, 10, 42, 0.3);
}

.college-results-cards-wrapper::-webkit-scrollbar {
    width: 6px;
}

.college-results-cards-wrapper::-webkit-scrollbar-track {
    background: rgba(10, 10, 42, 0.3);
    border-radius: 3px;
}

.college-results-cards-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 247, 255, 0.6);
    border-radius: 3px;
}

.college-results-cards-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 247, 255, 0.8);
}

.college-result-card {
    background: rgba(10, 10, 42, 0.95);
    border: 1.5px solid var(--accent-color);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 247, 255, 0.08);
    padding: 16px 18px;
    margin: 0 0 8px 0;
    color: var(--text-color);
    transition: box-shadow 0.2s;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.college-result-card:hover {
    box-shadow: 0 4px 24px rgba(0, 247, 255, 0.18);
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 7px;
    font-size: 1rem;
    gap: 8px;
    flex-wrap: wrap;
}

.card-label {
    font-weight: 600;
    color: var(--accent-color);
    margin-right: 8px;
    flex-shrink: 0;
    min-width: 90px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: left;
}

.card-value {
    color: var(--text-color);
    word-break: break-word;
    text-align: right;
    flex: 1;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.4;
    max-width: 60%;
}

@media screen and (max-width: 768px) {
    .college-results-cards-wrapper {
        gap: 12px;
        margin: 8px 0;
        padding: 0 4px;
    }

    .college-result-card {
        padding: 14px 12px;
        font-size: 0.95rem;
        border-radius: 10px;
        overflow: hidden;
    }

    .card-label {
        font-size: 0.95rem;
        min-width: 75px;
        max-width: 40%;
        text-align: left;
    }

    .card-value {
        max-width: 55%;
        text-align: left;
    }

    .card-row {
        font-size: 0.95rem;
        margin-bottom: 6px;
        gap: 8px;
    }
}

@media screen and (max-width: 480px) {
    .college-result-card {
        padding: 12px 8px;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .card-label {
        font-size: 0.9rem;
        min-width: 70px;
        max-width: 35%;
    }

    .card-value {
        max-width: 60%;
        font-size: 0.9rem;
    }

    .card-row {
        font-size: 0.9rem;
        margin-bottom: 6px;
        gap: 6px;
    }
}

/* Specific styles for left sticky note heading - no hover effects */
.sticky-note .note-content h3 {
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    color: var(--accent-color);
    text-shadow: none;
}

/* Specific styles for course breakdown note heading - with hover effects */
.course-breakdown-note .note-content h3 {
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--glow-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.course-breakdown-note .note-content h3:hover {
    color: #fff;
    text-shadow: 0 0 12px var(--glow-color), 0 0 20px var(--glow-color);
    transform: scale(1.02);
}

/* Hide the Learn More link since heading will have same functionality */
.course-breakdown-note .note-cta {
    display: none;
}

/* Course Modal Styles - 3D Coverflow */
#course-modal .modal-content.course-coverflow-modal {
    max-width: 900px;
    width: 92%;
    padding: 30px 20px 50px 20px;
    margin: 3vh auto;
    border-radius: 20px;
    max-height: 95vh;
    overflow: visible;
    position: relative;
    /* Establish stacking context */
}

/* Ensure close button is fully clickable in course modal */
#course-modal .close-btn {
    z-index: 10001 !important;
    /* Above everything including carousel arrows */
    pointer-events: auto !important;
}

.coverflow-main-title {
    color: var(--accent-color);
    font-size: 2rem;
    margin-top: -15px;
    margin-bottom: 50px;
    text-align: center;
    font-weight: 600;
    text-shadow: 0 0 10px var(--glow-color);
    position: relative;
    z-index: 150;
    pointer-events: none;
    /* Don't block clicks on close button */
}

/* Coverflow Container */
.coverflow-container {
    position: relative;
    width: 100%;
    height: 850px;
    overflow: visible;
}

/* Carousel Navigation Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 247, 255, 0.15);
    border: 2px solid rgba(0, 247, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.carousel-arrow svg {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    background: rgba(0, 247, 255, 0.3);
    border-color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px var(--glow-color);
}

.carousel-arrow:hover svg {
    color: #fff;
}

.carousel-arrow-left {
    left: 10%;
}

.carousel-arrow-right {
    right: 10%;
}

/* Arrows are always active for infinite loop */
.carousel-arrow-left,
.carousel-arrow-right {
    opacity: 1;
    pointer-events: auto;
}

.wgh-slider {
    position: relative;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
}

.wgh-slider__viewport {
    position: relative;
    height: 100%;
    width: 100%;
}

.wgh-slider__viewbox {
    display: block;
    position: relative;
    perspective: 150vw;
    margin: -40px auto 0 auto;
    width: 60%;
    max-width: 550px;
    transform-style: preserve-3d;
    z-index: 0;
}

.wgh-slider__viewbox::before {
    position: relative;
    top: 0;
    left: 0;
    display: block;
    content: "";
    height: 0;
    padding-bottom: 75%;
    width: 100%;
}

.wgh-slider__container {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    transition: transform 0.4s cubic-bezier(0.62, 0.28, 0.23, 0.99) 0.2s;
    transform-style: preserve-3d;
}

.wgh-slider-target {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    visibility: hidden;
}

input.wgh-slider-target {
    display: none;
}

/* Slide positioning - Disabled for circular carousel */
/* #slide-1:checked ~ .wgh-slider__viewport .wgh-slider__container {
    transform: translateX(0%);
}

#slide-2:checked ~ .wgh-slider__viewport .wgh-slider__container {
    transform: translateX(-50%);
}

#slide-3:checked ~ .wgh-slider__viewport .wgh-slider__container {
    transform: translateX(-100%);
} */

.wgh-slider-item {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
    transform: translate3d(0, 0, 0) rotateY(55deg);
    transition: all 0.5s cubic-bezier(0.62, 0.28, 0.23, 0.99) 0.1s;
}

.wgh-slider-item:nth-child(1) {
    left: -10%;
    transform: translate3d(-50%, -15%, 0) rotateY(55deg);
}

.wgh-slider-item:nth-child(2) {
    left: 50%;
    transform: translate3d(-50%, -15%, 0) rotateY(0deg);
}

.wgh-slider-item:nth-child(3) {
    left: 110%;
    transform: translate3d(-50%, -15%, 0) rotateY(-55deg);
}

.wgh-slider-item__trigger {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    cursor: pointer;
}

/* Hide trigger on active slide */
#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) .wgh-slider-item__trigger,
#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) .wgh-slider-item__trigger,
#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) .wgh-slider-item__trigger {
    display: none;
}

.wgh-slider-item__inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-origin: center center;
    transform: scale(0.7);
    transition: all 0.4s cubic-bezier(0.62, 0.28, 0.23, 0.99) 0s;
    z-index: 10;
}

.wgh-slider-item__inner::before {
    display: block;
    position: absolute;
    content: "";
    top: 20px;
    left: 20px;
    bottom: 20px;
    right: 20px;
    z-index: 0;
    transition: transform 0.3s cubic-bezier(0.62, 0.28, 0.23, 0.99) 0.15s;
    transform: translate(-20px, 10px);
    box-shadow: 0 14px 28px rgba(0, 247, 255, 0.25), 0 10px 10px rgba(0, 247, 255, 0.22);
}

/* Active slide styles */
#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) .wgh-slider-item__inner,
#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) .wgh-slider-item__inner,
#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) .wgh-slider-item__inner {
    transform: scale(1.05);
    transition-delay: 0.4s;
}

#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) .wgh-slider-item__inner::before,
#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) .wgh-slider-item__inner::before,
#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) .wgh-slider-item__inner::before {
    transform: translate(0, 20px);
}

#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3)~.wgh-slider-item .wgh-slider-item__inner::before,
#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2)~.wgh-slider-item .wgh-slider-item__inner::before,
#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1)~.wgh-slider-item .wgh-slider-item__inner::before {
    transform: translate(20px, 10px);
}

/* Course Card Content */
.course-card-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 10, 42, 0.95), rgba(10, 10, 42, 0.85));
    border: 2px solid rgba(0, 247, 255, 0.4);
    border-radius: 15px;
    padding: 30px 20px 25px 20px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 2;
    backdrop-filter: blur(10px);
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 247, 255, 0.4) rgba(0, 247, 255, 0.05);
}

.course-card-content::-webkit-scrollbar {
    display: none;
}

.card-title {
    color: var(--accent-color);
    font-size: 1.15rem;
    margin-bottom: 8px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 0 8px var(--glow-color);
}

.card-description {
    color: var(--text-color);
    font-size: 0.92rem;
    line-height: 1.4;
    margin-bottom: 12px;
    text-align: center;
}

.card-topics {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.card-topics li {
    color: var(--text-color);
    font-size: 0.88rem;
    padding: 7px 12px;
    margin-bottom: 5px;
    background-color: rgba(0, 247, 255, 0.08);
    border-left: 3px solid var(--accent-color);
    border-radius: 6px;
    transition: all 0.3s ease;
    line-height: 1.35;
}

.card-topics li:hover {
    background-color: rgba(0, 247, 255, 0.15);
    transform: translateX(5px);
}

/* Circular repositioning - When Slide 1 is active */
#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) {
    left: 50% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(0deg);
    z-index: 9999;
    opacity: 1;
}

#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) {
    left: 110% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(-55deg);
}

#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) {
    left: -10% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(55deg);
}

/* Circular repositioning - When Slide 2 is active */
#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) {
    left: 50% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(0deg);
    z-index: 9999;
    opacity: 1;
}

#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) {
    left: 110% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(-55deg);
}

#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) {
    left: -10% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(55deg);
}

/* Circular repositioning - When Slide 3 is active */
#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) {
    left: 50% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(0deg);
    z-index: 9999;
    opacity: 1;
}

#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) {
    left: 110% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(-55deg);
}

#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) {
    left: -10% !important;
    transform: translate3d(-50%, -15%, 0) rotateY(55deg);
}

/* Hide content on non-active cards */
.wgh-slider-item .card-description,
.wgh-slider-item .card-topics {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) .card-description,
#slide-3:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(3) .card-topics,
#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) .card-description,
#slide-2:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(2) .card-topics,
#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) .card-description,
#slide-1:checked~.wgh-slider__viewport .wgh-slider-item:nth-child(1) .card-topics {
    opacity: 1;
}

/* Responsive */
@media screen and (max-width: 768px) {
    #course-modal .modal-content.course-coverflow-modal {
        width: 95%;
        padding: 20px 15px 40px 15px;
    }

    .coverflow-main-title {
        font-size: 1.8rem;
        margin-top: -10px;
        margin-bottom: 40px;
    }

    .coverflow-container {
        height: 750px;
        overflow: visible;
    }

    .wgh-slider__viewbox {
        width: 75%;
        max-width: 500px;
        margin: -30px auto 0 auto;
    }

    .card-title {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .card-description {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 15px;
    }

    .card-topics li {
        font-size: 0.95rem;
        padding: 10px 12px;
        margin-bottom: 8px;
        line-height: 1.4;
    }

    .carousel-arrow {
        width: 40px;
        height: 40px;
    }

    .carousel-arrow svg {
        width: 20px;
        height: 20px;
    }

    .carousel-arrow-left {
        left: 5%;
    }

    .carousel-arrow-right {
        right: 5%;
    }
}

@media screen and (max-width: 480px) {
    #course-modal .modal-content.course-coverflow-modal {
        padding: 15px 10px 35px 10px;
        margin: 15vh auto 2vh auto;
        /* increased top margin to reveal middle layer heading */
    }

    .coverflow-container {
        height: 720px;
        overflow: visible;
    }

    .wgh-slider__viewbox {
        width: 85%;
        max-width: 400px;
        margin: -20px auto 0 auto;
    }

    .course-card-content {
        padding: 25px 20px 20px 20px;
        overflow-y: auto;
        scrollbar-width: auto;
        scrollbar-color: rgba(0, 247, 255, 0.8) rgba(0, 247, 255, 0.15);
    }

    .course-card-content::-webkit-scrollbar {
        width: 10px;
    }

    .course-card-content::-webkit-scrollbar-track {
        background: rgba(0, 247, 255, 0.15);
        border-radius: 8px;
        border: 1px solid rgba(0, 247, 255, 0.2);
    }

    .course-card-content::-webkit-scrollbar-thumb {
        background: rgba(0, 247, 255, 0.7);
        border-radius: 8px;
        border: 1px solid rgba(0, 247, 255, 0.9);
        box-shadow: 0 0 5px rgba(0, 247, 255, 0.5);
    }

    .course-card-content::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 247, 255, 0.9);
        box-shadow: 0 0 8px rgba(0, 247, 255, 0.8);
    }

    .card-title {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .card-description {
        font-size: 0.95rem;
        line-height: 1.45;
        margin-bottom: 15px;
    }

    .card-topics li {
        font-size: 0.9rem;
        padding: 9px 10px;
        margin-bottom: 7px;
        line-height: 1.4;
    }

    .carousel-arrow {
        width: 35px;
        height: 35px;
    }

    .carousel-arrow svg {
        width: 18px;
        height: 18px;
    }

    .carousel-arrow-left {
        left: 2%;
    }

    .carousel-arrow-right {
        right: 2%;
    }
}

#course-modal #modal-title {
    color: var(--accent-color);
    font-size: 1.9rem;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}

#course-modal #modal-description {
    color: var(--text-color);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
}

#course-modal #modal-modules {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

#course-modal #modal-modules li {
    color: var(--text-color);
    font-size: 1rem;
    padding: 10px 15px;
    margin-bottom: 8px;
    background-color: rgba(0, 247, 255, 0.05);
    border-left: 3px solid var(--accent-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

#course-modal #modal-modules li:hover {
    background-color: rgba(0, 247, 255, 0.1);
    transform: translateX(5px);
}

#course-modal #modal-duration {
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin-top: 15px;
}

@media screen and (max-width: 768px) {
    #course-modal .modal-content {
        padding: 25px 20px;
        max-width: 90%;
    }

    #course-modal #modal-title {
        font-size: 1.6rem;
    }

    #course-modal #modal-description {
        font-size: 0.95rem;
    }

    #course-modal #modal-modules li {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}

@media screen and (max-width: 480px) {
    #course-modal .modal-content {
        padding: 20px 15px;
    }

    #course-modal #modal-title {
        font-size: 1.4rem;
    }

    #course-modal #modal-description {
        font-size: 0.9rem;
    }

    #course-modal #modal-modules li {
        font-size: 0.85rem;
        padding: 7px 10px;
    }

    #course-modal #modal-duration {
        font-size: 1rem;
    }
}

@media screen and (max-width: 768px) {
    .syllabus-container {
        padding: 5px;
        font-size: 0.85rem;
    }

    .syllabus-item {
        margin: 4px 0;
        display: block;
        width: 100%;
    }

    .track-level-up {
        font-size: 1.2rem;
        text-align: center;
        margin-bottom: 10px;
    }

    /* Ensure horizontal scrolling is visible for sliders */
    .slider-container {
        overflow-x: scroll;
        display: flex;
    }

    .swiper-slide p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

/* ========== Python Quiz Game Styles ========== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fullscreen Quiz Styles */
#quiz-fullscreen {
    animation: fadeIn 0.5s ease-in;
    background-color: rgba(10, 10, 42, 0.3) !important;
    /* More transparent to show galaxy background */
    backdrop-filter: blur(2px);
    /* Less blur to see stars better */
    visibility: visible !important;
}

.quiz-header-fullscreen {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 42, 0.9);
    padding: 15px 25px;
    border-radius: 15px;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 20px var(--glow-color);
    backdrop-filter: blur(10px);
    z-index: 1001;
}

.quiz-stats {
    display: flex;
    gap: 30px;
    font-size: 1.2rem;
    color: var(--text-color);
    font-weight: 600;
}

.stat-item {
    display: flex;
    align-items: center;
}

#quiz-score {
    color: var(--accent-color);
    font-size: 1.4rem;
    margin-left: 5px;
}

/* Tetris Block Question */
.tetris-block {
    position: fixed;
    top: -300px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 700px;
    background: linear-gradient(135deg, rgba(0, 100, 200, 0.95), rgba(0, 150, 255, 0.95));
    border: 4px solid var(--accent-color);
    border-radius: 60px 70px 65px 55px;
    box-shadow:
        0 10px 30px rgba(0, 247, 255, 0.6),
        inset 0 0 20px rgba(0, 247, 255, 0.4),
        0 0 50px rgba(0, 247, 255, 0.5);
    z-index: 1002;
    display: none;
    opacity: 0;
    overflow: hidden;
}

@keyframes tetrisFall {
    0% {
        top: -300px;
        transform: translateX(-50%) rotate(-5deg);
        opacity: 0;
    }

    70% {
        top: 140px;
        transform: translateX(-50%) rotate(2deg);
    }

    85% {
        top: 120px;
        transform: translateX(-50%) rotate(-1deg);
    }

    100% {
        top: 130px;
        transform: translateX(-50%) rotate(0deg);
        opacity: 1;
    }
}

.tetris-content {
    padding: 30px 40px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    line-height: 1.6;
    border-radius: inherit;
}

/* Hide main content when quiz is active */
.content-wrapper.quiz-active {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Bubbles Container */
#bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1001;
}

/* Bubble Styles */
.bubble {
    position: absolute;
    background: linear-gradient(135deg, rgba(0, 247, 255, 0.4), rgba(0, 200, 255, 0.6));
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 25px var(--glow-color), inset 0 0 15px rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    animation: float 3s ease-in-out infinite;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    word-wrap: break-word;
    overflow-wrap: break-word;
    pointer-events: auto;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    opacity: 0;
    box-sizing: border-box;
    min-width: 0;
}

/* Mobile bubbles - keep circular but smaller */
@media screen and (max-width: 768px) {
    .bubble {
        font-size: 0.85rem !important;
        padding: 15px !important;
        border-radius: 50% !important;
        /* Keep circular */
        min-width: 90px !important;
        max-width: 120px !important;
        min-height: 90px !important;
        max-height: 120px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        line-height: 1.2 !important;
    }
}

@keyframes slideInMobile {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.bubble-mobile:hover {
    transform: scale(1.02) !important;
    /* Subtle scale instead of large */
    box-shadow: 0 6px 20px rgba(0, 247, 255, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.3) !important;
}

.bubble.appear {
    animation: bubbleAppear 0.8s ease-out forwards, float 3s ease-in-out infinite;
}

/* Mobile bubbles use balloon animation */
@media screen and (max-width: 768px) {
    .bubble.appear {
        animation: balloonPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards, float 3s ease-in-out infinite;
    }
}

@keyframes bubbleAppear {
    0% {
        transform: scale(0) translateY(50px);
        opacity: 0;
    }

    50% {
        transform: scale(1.15) translateY(-10px);
        opacity: 0.8;
    }

    70% {
        transform: scale(0.95) translateY(5px);
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Balloon pop-up animation for mobile */
@keyframes balloonPop {
    0% {
        transform: scale(0) translateY(80px);
        opacity: 0;
    }

    40% {
        transform: scale(1.2) translateY(-15px);
        opacity: 0.7;
    }

    60% {
        transform: scale(0.9) translateY(8px);
        opacity: 0.9;
    }

    80% {
        transform: scale(1.05) translateY(-3px);
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.bubble:hover {
    transform: scale(1.15);
    box-shadow: 0 0 35px var(--glow-color), 0 0 50px var(--glow-color);
    background: linear-gradient(135deg, rgba(0, 247, 255, 0.6), rgba(0, 230, 255, 0.8));
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-25px);
    }
}

/* Burst Animation */
@keyframes burst {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.burst {
    animation: burst 0.5s ease-out forwards !important;
}

/* Particle effects */
.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    animation: particleExplode 0.8s ease-out forwards;
}

@keyframes particleExplode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Feedback Container */
#feedback-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1003;
    background: rgba(10, 10, 42, 0.95);
    padding: 50px;
    border-radius: 25px;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 40px var(--glow-color);
    text-align: center;
    max-width: 500px;
    width: 90%;
    backdrop-filter: blur(15px);
}

.feedback-content h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.feedback-content p {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 30px;
}

.feedback-content .btn {
    font-size: 1.3rem;
    padding: 15px 35px;
}

/* Mobile responsive for quiz */
@media screen and (max-width: 768px) {
    .quiz-header-fullscreen {
        width: 95%;
        padding: 12px 15px;
        flex-direction: column;
        gap: 10px;
    }

    .quiz-stats {
        gap: 15px;
        font-size: 1rem;
        flex-direction: column;
        gap: 5px;
    }

    .tetris-block {
        width: 90%;
        max-width: none;
        border-radius: 45px 50px 48px 42px;
    }

    @keyframes tetrisFall {
        0% {
            top: -300px;
            transform: translateX(-50%) rotate(-5deg);
            opacity: 0;
        }

        70% {
            top: 120px;
            transform: translateX(-50%) rotate(2deg);
        }

        85% {
            top: 110px;
            transform: translateX(-50%) rotate(-1deg);
        }

        100% {
            top: 115px;
            transform: translateX(-50%) rotate(0deg);
            opacity: 1;
        }
    }

    .tetris-content {
        padding: 25px 20px;
        font-size: 1.2rem;
    }

    .bubble {
        font-size: 0.9rem !important;
        padding: 12px !important;
        min-width: 100px !important;
        max-width: 110px !important;
        min-height: 100px !important;
        max-height: 110px !important;
    }

    .bubble:not(.bubble-mobile) {
        font-size: 0.9rem !important;
        padding: 15px !important;
        max-width: 90vw !important;
        max-height: 90vh !important;
    }

    #feedback-container {
        width: 90%;
        padding: 35px 25px;
    }

    .feedback-content h2 {
        font-size: 2.8rem !important;
    }

    .feedback-content p {
        font-size: 1.2rem !important;
    }
}

@media screen and (max-width: 480px) {
    .tetris-content {
        padding: 20px 15px;
        font-size: 1.1rem;
    }

    .tetris-block {
        border-radius: 35px 40px 38px 32px;
    }

    .bubble {
        font-size: 0.85rem !important;
        padding: 10px !important;
        min-width: 90px !important;
        max-width: 100px !important;
        min-height: 90px !important;
        max-height: 100px !important;
        line-height: 1.2 !important;
    }

    .bubble:not(.bubble-mobile) {
        font-size: 0.85rem !important;
        padding: 12px !important;
        max-width: 90vw !important;
        max-height: 90vh !important;
        line-height: 1.2 !important;
    }

    #feedback-container {
        padding: 30px 20px;
    }

    .feedback-content h2 {
        font-size: 2.2rem !important;
    }

    .feedback-content p {
        font-size: 1rem !important;
    }

    .feedback-content .btn {
        font-size: 1.1rem !important;
        padding: 12px 25px !important;
    }
}

/* --- Optimized Contact Form Layout (To reduce scrolling) --- */
#contact-modal .modal-content {
    padding: 20px !important;
    max-width: 600px !important;
    margin-top: 0 !important;
}

#contact-modal h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    padding: 8px 15px;
}

#contact-modal .contact-info {
    padding: 8px 15px;
    margin-top: 0;
    margin-bottom: 10px;
}

#contact-modal .contact-info p {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

#contact-modal .form-group {
    margin-bottom: 8px;
}

#contact-modal .form-group label {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

#contact-modal .form-group input,
#contact-modal .form-group textarea {
    padding: 6px 10px;
    font-size: 0.9rem;
    height: auto;
}

#contact-modal .form-group textarea {
    min-height: 50px;
}

#contact-modal .form-submit-btn {
    padding: 8px;
    margin-top: 5px;
}

/* Curriculum prompt compactness */
#contact-modal .curriculum-prompt {
    margin-bottom: 8px;
    padding: 6px 10px;
}

#contact-modal .curriculum-prompt h4 {
    margin-bottom: 2px;
    font-size: 1rem;
}

#contact-modal .curriculum-prompt p {
    font-size: 0.8rem;
}

/* Mobile optimizations */
@media screen and (max-width: 768px) {
    #contact-modal .modal-content {
        padding: 15px !important;
        width: 95% !important;
        margin: 10px auto !important;
        max-height: 95vh !important;
    }

    #contact-modal h2 {
        font-size: 1.4rem;
        margin-bottom: 8px;
        padding: 5px 12px;
    }

    #contact-modal .contact-info {
        padding: 5px 10px;
        margin-bottom: 8px;
    }

    #contact-modal .form-group input {
        padding: 6px 8px;
    }

    #contact-modal .form-submit-btn {
        padding: 8px;

        #contact-modal h2 {
            font-size: 1.4rem;
            margin-bottom: 8px;
            padding: 5px 12px;
        }

        #contact-modal .contact-info {
            padding: 5px 10px;
            margin-bottom: 8px;
        }

        #contact-modal .form-group input {
            padding: 6px 8px;
        }

        #contact-modal .form-submit-btn {
            padding: 8px;
        }
    }

    /* --- Optimized Course Carousel Layout (No Scrolling) --- */
    #course-modal .modal-content.course-coverflow-modal {
        padding: 20px;
        margin: auto !important;
        /* Center vertically and horizontally */
        max-height: 90vh;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    #course-modal #modal-main-title {
        font-size: 2rem;
        margin-bottom: 10px;
        flex-shrink: 0;
        text-align: center;
    }

    /* Container for the slider */
    .coverflow-container {
        display: flex !important;
        align-items: flex-start;
        /* Align to top to be closer to title */
        justify-content: center;
        width: 100%;
        height: auto;
        margin-top: 10px;
        /* Small gap */
        flex: 1;
    }
}

.wgh-slider {
    height: 50vh !important;
    min-height: 350px;
    display: flex !important;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0;
    margin-top: -5vh !important;
    /* Force pull up */
}

.wgh-slider__viewbox {
    margin-top: 0 !important;
    height: 45vh !important;
}

.course-card-content {
    padding: 20px !important;
}

.card-title {
    font-size: 1.3rem !important;
    margin-bottom: 8px !important;
}

.card-topics li {
    padding: 6px 10px !important;
    margin-bottom: 5px !important;
    font-size: 0.95rem !important;
}

/* Mobile optimizations */
@media screen and (max-width: 768px) {
    #course-modal .modal-content.course-coverflow-modal {
        padding: 10px !important;
        margin-top: 5vh !important;
        height: auto !important;
        max-height: 90vh !important;
    }

    #modal-main-title {
        font-size: 1.5rem !important;
        margin-bottom: 5px !important;
        flex-shrink: 0;
    }

    .coverflow-container {
        align-items: center !important;
        justify-content: center !important;
        margin-top: 0 !important;
        height: auto !important;
        display: flex !important;
        flex: 1;
    }

    .wgh-slider {
        height: 50vh !important;
        /* Reduced from 60vh to fit better */
        min-height: 300px !important;
        margin-top: 15vh !important;
        /* Adjusted margin with top:0 */
        padding-top: 0 !important;
        align-items: center !important;
        justify-content: center !important;
        top: 0 !important;
        transform: none !important;
    }

    .wgh-slider__viewbox {
        height: 45vh !important;
        margin-top: 0px !important;
    }

    .course-card-content {
        padding: 15px !important;
        max-height: 45vh;
        /* Allow scrolling inside card if needed, but not page */
    }
}