:root {
    --iron-man: #cc0000;
    --captain-america: #3f51b5;
    --thor: #7e57c2;
    --hulk: #4caf50;
    --black-widow: #e53935;
    --hawkeye: #5d4037;
    --avengers-blue: #1a237e;
    --avengers-gold: #ffd700;
}

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

body {
    background: #0c1020;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    background-image: 
        url(/image/1st.jpg),
        url(/image/2nd.webp),
        url(/image/3rd.webp),
        radial-gradient(circle at 20% 30%, rgba(26, 35, 126, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(204, 0, 0, 0.3) 0%, transparent 40%);
    background-size: cover, cover, cover, auto, auto;
    background-position: center, center, center, 20% 30%, 80% 70%;
    background-blend-mode: overlay;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-section model-viewer {
    width: 100%;
    max-width: min(90vw, 400px);
    height: clamp(200px, 40vw, 300px);
    margin: 0 auto 1.5rem;
    z-index: 10;
}

.hero-section model-viewer::part(default-ar-button) {
    padding: 0.5rem 0.75rem;
    font-size: clamp(12px, 3vw, 14px);
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.hero-section model-viewer::part(default-ar-button):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(204, 0, 0, 0.6);
}


.hero-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: entryFadeSlide 1s ease-out forwards;
}


.shield-background {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(300px, 80vw, 800px);
    height: clamp(300px, 80vw, 800px);
    border-radius: 100%;
    opacity: 0.1;
    animation: shieldRotateScale 60s infinite linear;
}


.team-photo-container {
    width: 100%;
    height: clamp(12rem, 40vw, 16rem);
    border-radius: 0.5rem;
    background-image: url('/image/team.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: entryFadeSlide 1.5s ease-out forwards;
}

.team-photo-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 16, 32, 0.6);
    z-index: 0;
}

.team-photo-container span {
    position: relative;
    z-index: 10;
    font-size: clamp(1rem, 4vw, 1.5rem);
}


#characters, #deta {
    background: transparent;
    padding: 1rem;
}


.avengers-logo {
    font-family: 'Arial Black', sans-serif;
    text-transform: uppercase;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    background: linear-gradient(to right, #ffd700, #ff6b00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logo-glow 3s infinite alternate, entryScaleIn 1s ease-out forwards;
}


.particle {
    position: absolute;
    background-color: rgba(255, 215, 0, 0.7);
    border-radius: 50%;
    animation: particleOrbit 15s infinite ease-in-out;
    width: clamp(5px, 1vw, 10px);
    height: clamp(5px, 1vw, 10px);
}


.particle:nth-child(odd) {
    animation-delay: -2s;
}
.particle:nth-child(even) {
    animation-delay: -5s;
}


.character-card {
    background: transparent;
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    width: 100%;
    max-width: min(90vw, 350px);
    animation: entrySlideLeft 0.8s ease-out forwards;
}


.character-card:nth-child(1) { animation-delay: 0.2s; }
.character-card:nth-child(2) { animation-delay: 0.4s; }
.character-card:nth-child(3) { animation-delay: 0.6s; }
.character-card:nth-child(4) { animation-delay: 0.8s; }

.character-card-ironman .text-section {
    border-top: 4px solid var(--iron-man);
    border: 2px solid rgba(255, 215, 0, 0.2);
}
.character-card-captain .text-section { border-top: 4px solid var(--captain-america); }
.character-card-thor .text-section { border-top: 4px solid var(--thor); }
.character-card-hulk .text-section { border-top: 4px solid var(--hulk); }
.character-card-widow .text-section { border-top: 4px solid var(--black-widow); }
.character-card-hawkeye .text-section { border-top: 4px solid var(--hawkeye); }

.model-container {
    width: 100%;
    height: clamp(150px, 30vw, 250px);
    position: relative;
    background: transparent;
    border: none;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

.character-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    mix-blend-mode: lighten;
    opacity: 0.95;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.character-card:hover .character-image {
    transform: scale(1.2);
}

.text-section {
    background: linear-gradient(145deg, rgba(20, 25, 70, 0.8), rgba(12, 16, 32, 0.8));
    backdrop-filter: blur(10px);
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    padding: 1.5rem;
}

.character-name {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: clamp(1rem, 4vw, 1.4rem);
}

.character-name-ironman { color: var(--iron-man); }
.character-name-captain { color: var(--captain-america); }
.character-name-thor { color: var(--thor); }
.character-name-hulk { color: var(--hulk); }
.character-name-widow { color: var(--black-widow); }
.character-name-hawkeye { color: var(--hawkeye); }


.w-full{
     background: linear-gradient(135deg, #071960 0%, #430a02 50%, #120441 100%);
     height: 100%;
}



.avengers-button {
     background: linear-gradient(135deg, #071960 0%, #430a02 50%, #120441 100%);
    color: white;
    padding: clamp(8px, 2vw, 12px) clamp(16px, 4vw, 24px);
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    border: none;
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.4);
    font-size: clamp(0.8rem, 3vw, 1rem);
    touch-action: manipulation;
    animation: entryScaleIn 1s ease-out forwards, buttonSpinGlow 2s infinite ease-in-out;
}

.avengers-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(204, 0, 0, 0.6);
    animation: none;
}

.character-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.character-detail-modal.active {
    opacity: 1;
    pointer-events: all;
    animation: entryScaleIn 0.5s ease-out;
}

.modal-content {
    background: linear-gradient(145deg, #0c1020, #1a237e);
    width: clamp(280px, 90vw, 1200px);
    height: clamp(70vh, 85vh, 85vh);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    border: 2px solid var(--avengers-gold);
}

@media (min-width: 768px) {
    .modal-content {
        flex-direction: row;
    }
    .modal-model, .modal-info {
        width: 50%;
    }
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    border: 1px solid var(--avengers-gold);
    color: var(--avengers-gold);
    font-size: 1.1rem;
    animation: modalCloseRotate 4s infinite linear;
}

.modal-model {
    background: #0b0a09 url(/image/md.gif);
    padding: 1rem;
}
 
        .fullscreen-toggle {
            position: absolute;
            top: 10px;
            left: 10px; 
            background: rgba(0, 0, 0, 0.7);
            color: white;
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 1001; 
            transition: background 0.3s;
        }
        .fullscreen-toggle:hover {
            background: rgba(0, 0, 0, 0.9);
        }
        .modal-model.fullscreen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: 1000;
          background: #0b0a09 url(/image/md.gif);
        }
        .modal-model.fullscreen model-viewer {
            width: 100%;
            height: 100%;
     background: #0b0a09 url(/image/md.gif);
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }
        .modal-model.fullscreen .modal-info {
            display: none;
        }
       
        .modal-model.fullscreen .modal-close {
            display: block;
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 1001; 
        }

.modal-info {
    padding: 1rem;
    overflow-y: auto;
}

.modal-character-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    loading: lazy;
}

model-viewer#modal-character-model {
    width: 100%;
    height: 100%;
    background-color: transparent;
    aspect-ratio: 1 / 1;
}

.abilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.ability {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 215, 0, 0.2);
    animation: entryScaleIn 0.6s ease-out forwards;
}


.ability:nth-child(1) { animation-delay: 0.1s; }
.ability:nth-child(2) { animation-delay: 0.2s; }
.ability:nth-child(3) { animation-delay: 0.3s; }
.ability:nth-child(4) { animation-delay: 0.4s; }

.ability:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
    border-color: var(--avengers-gold);
}

.ability-icon {
    font-size: 1.3rem;
    margin-bottom: 6px;
    color: var(--avengers-gold);
}

.movie-still, .comic-panel {
    min-width: clamp(80px, 20vw, 180px);
    height: clamp(50px, 12vw, 100px);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--avengers-gold);
}

.comic-panel {
    height: clamp(80px, 20vw, 160px);
}


.marvel-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.marvel-intro.active {
    opacity: 1;
    pointer-events: all;
}

.marvel-logo {
    width: clamp(200px, 50vw, 300px);
    animation: marvelIntro 2s ease-in-out;
}


.avengers-theme-audio {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.audio-control {
    background: rgba(0, 0, 0, 0.7);
    color: var(--avengers-gold);
    border: 1px solid var(--avengers-gold);
    border-radius: 50%;
    width: clamp(30px, 8vw, 40px);
    height: clamp(30px, 8vw, 40px);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    touch-action: manipulation;
}


.power-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin: 10px 0;
}

.power-level {
    height: 100%;
    border-radius: 10px;
}

body.intro-video-active {
    overflow: hidden;
}

.intro-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Use full viewport height */
    min-height: 100vh; /* Ensure it covers the full height */
    background: linear-gradient(135deg, #071960 0%, #430a02 50%, #120441 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    overflow: hidden; /* Prevent overflow */
}

.intro-video.active {
    opacity: 1;
    pointer-events: all;
    animation: entryFadeSlide 1s ease-in-out;
}

.intro-video.hidden {
    display: none;
}

.intro-video video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Use cover to ensure full coverage */
    object-position: center;
    max-width: none; /* Remove max-width to allow full scaling */
    max-height: none; /* Remove max-height to allow full scaling */
}

.sound-toggle {
    position: fixed;
    bottom: clamp(10px, 3vw, 15px);
    right: clamp(10px, 3vw, 15px);
    background: linear-gradient(90deg, #1a237e, #cc0000);
    color: white;
    padding: clamp(8px, 2.5vw, 12px) clamp(16px, 4vw, 20px);
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    border: none;
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.4);
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
    z-index: 2100;
    animation: entryScaleIn 1s ease-out forwards, buttonSpinGlow 2s infinite ease-in-out;
}

.sound-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(204, 0, 0, 0.6);
    animation: none;
}


@keyframes rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes logo-glow {
    0% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    100% { text-shadow: 0 0 30px rgba(255, 215, 0, 0.9), 0 0 40px rgba(255, 215, 0, 0.6); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    50% { transform: translateY(-50px) translateX(20px); opacity: 1; }
}

@keyframes glow {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

@keyframes marvelIntro {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; pointer-events: none; }
}

@keyframes entryFadeSlide {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes entryScaleIn {
    0% { opacity: 0; transform: scale(0.5) rotate(0deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

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

@keyframes shieldRotateScale {
    0% { transform: translate(-50%, -50%) rotate(0deg) scale(0.9); opacity: 0.05; }
    50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.05); opacity: 0.1; }
    100% { transform: translate(-50%, -50%) rotate(360deg) scale(0.9); opacity: 0.05; }
}

@keyframes particleOrbit {
    0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-60px) translateX(30px) rotate(180deg); opacity: 0.8; }
    100% { transform: translateY(0) translateX(0) rotate(360deg); opacity: 0.3; }
}

@keyframes buttonSpinGlow {
    0% { transform: rotate(0deg); box-shadow: 0 4px 15px rgba(204, 0, 0, 0.4); }
    50% { transform: rotate(10deg); box-shadow: 0 6px 20px rgba(204, 0, 0, 0.8); }
    100% { transform: rotate(0deg); box-shadow: 0 4px 15px rgba(204, 0, 0, 0.4); }
}

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

/* New Styles for Mission and Threat Sections */
#mission, #threat {
    background: transparent;
    padding: 1rem;
    animation: entryFadeSlide 1.5s ease-out forwards;
}

.mission-photo-container, .threat-photo-container {
    width: 100%;
    height: clamp(12rem, 40vw, 16rem); /* Adjusted height for better performance */
    border-radius: 0.5rem;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: entryFadeSlide 1.5s ease-out forwards;
}

.mission-photo-container {
    background-image: url(/image/aven.jpg); /* Changed to WebP for faster loading */
}

.threat-photo-container {
    background-image: url(image/loki.jpg); /* Changed to WebP for faster loading */
}

.mission-photo-container::before, .threat-photo-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 16, 32, 0.7); /* Increased opacity for better contrast */
    z-index: 0;
}

.mission-photo-container span, .threat-photo-container span {
    position: relative;
    z-index: 10;
    font-size: clamp(1rem, 4vw, 1.5rem);
    text-transform: uppercase;
    color: var(--avengers-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

#missionModal, #threatModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#missionModal:not(.hidden), #threatModal:not(.hidden) {
    opacity: 1;
    pointer-events: all;
    animation: entryScaleIn 0.5s ease-out;
}

#missionModal .avengers-logo, #threatModal .avengers-logo {
    text-shadow: 0 0 20px rgba(204, 0, 0, 0.8);
}

#missionModal button, #threatModal button {
    animation: entryScaleIn 1s ease-out forwards, buttonSpinGlow 2s infinite ease-in-out;
}

#missionModal button:hover, #threatModal button:hover {
    animation: none;
}

.mission-details, .threat-details {
    width: 100%;
    height: clamp(100px, 25vw, 200px);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--avengers-gold);
    animation: entryFadeSlide 0.8s ease-out forwards;
}

/* Media Queries for Responsiveness with Image Optimization */
@media (max-width: 1024px) {
    .intro-video video {
        width: 100vw;
        height: 100vh;
        object-fit: contain;
    }

    .hero-section model-viewer {
        max-width: min(80vw, 300px);
        height: clamp(120px, 30vw, 180px);
    }

    .hero-section h1 {
        font-size: clamp(2.5rem, 8vw, 5rem);
    }

    .hero-section p {
        font-size: clamp(1rem, 4vw, 1.5rem);
        max-width: 90%;
    }

    .shield-background {
        width: clamp(200px, 70vw, 500px);
        height: clamp(200px, 70vw, 500px);
    }

    .team-photo-container, .mission-photo-container, .threat-photo-container {
        height: clamp(8rem, 30vw, 12rem);
        background-size: contain; /* Use contain for smaller screens to reduce load */
    }

    .avengers-logo {
        font-size: clamp(1.2rem, 5vw, 2rem);
    }

    .character-card {
        max-width: min(85vw, 280px);
        margin-left: auto;
        margin-right: auto;
    }

    .character-image {
        max-height: clamp(100px, 25vw, 200px);
    }

    .modal-content {
        width: 95vw;
        height: 90vh;
    }

    .modal-close {
        width: clamp(20px, 6vw, 30px);
        height: clamp(20px, 6vw, 30px);
        font-size: 0.9rem;
    }

    .mission-details, .threat-details {
        height: clamp(80px, 20vw, 160px);
    }
}

@media (max-width: 768px) {
     .intro-video video {
        width: 100vw;
        height: 100vh;
        object-fit: contain;
        object-position: center center;
    }

    .sound-toggle {
        padding: clamp(5px, 1.5vw, 8px) clamp(10px, 3vw, 14px);
        font-size: clamp(0.6rem, 2vw, 0.8rem);
        bottom: clamp(8px, 2.5vw, 12px);
        right: clamp(8px, 2.5vw, 12px);
        min-width: 48px;
        min-height: 48px;
    }

    .hero-section model-viewer {
        max-width: min(50vw, 200px);
        height: clamp(80px, 20vw, 120px);
    }

    .hero-section h1 {
        font-size: clamp(4rem, 6vw, 3rem);
    }

    .hero-section p {
        font-size: clamp(0.7rem, 3vw, 1rem);
        max-width: 95%;
    }

    .team-photo-container, .mission-photo-container, .threat-photo-container {
        height: clamp(6rem, 25vw, 9rem);
        background-size: contain;
    }

    .character-card {
        max-width: min(95vw, 240px);
    }

    .character-image {
        max-height: clamp(500px, 20vw, 150px);
    }

    .character-name {
        font-size: clamp(0.8rem, 3vw, 1rem);
    }

    .text-section p {
        font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    }

    .avengers-button {
        padding: clamp(20px, 1.2vw, 7px) clamp(8px, 2.5vw, 14px);
        font-size: clamp(0.6rem, 2vw, 0.7rem);
    }

    .movie-still, .comic-panel {
        min-width: clamp(80px, 20vw, 100px);
        height: clamp(50px, 12vw, 70px);
    }

    .comic-panel {
        height: clamp(80px, 20vw, 100px);
    }

    .mission-details, .threat-details {
        height: clamp(60px, 15vw, 120px);
    }
}

@media (max-width: 480px) {
    .intro-video video {
        width: 100vw;
        height: 100vh;
        object-fit: contain;
        object-position: center center;
    }

    .sound-toggle {
        padding: clamp(5px, 1.5vw, 8px) clamp(10px, 3vw, 14px);
        font-size: clamp(0.6rem, 2vw, 0.8rem);
        bottom: clamp(8px, 2.5vw, 12px);
        right: clamp(8px, 2.5vw, 12px);
        min-width: 48px;
        min-height: 48px;
    }

    .hero-section model-viewer {
        max-width: min(90vw, 200px);
        height: clamp(80px, 20vw, 120px);
    }

    .hero-section h1 {
        font-size: clamp(2rem, 6vw, 3rem);
    }

    .hero-section p {
        font-size: clamp(0.7rem, 3vw, 1rem);
        max-width: 95%;
    }

    .team-photo-container, .mission-photo-container, .threat-photo-container {
        height: clamp(6rem, 25vw, 9rem);
        background-size: contain;
    }

    .character-card {
        max-width: min(95vw, 240px);
    }

    .character-image {
        max-height: clamp(500px, 20vw, 150px);
    }

    .character-name {
        font-size: clamp(0.8rem, 3vw, 1rem);
    }

    .text-section p {
        font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    }

    .avengers-button {
        padding: clamp(10px, 1.2vw, 7px) clamp(8px, 2.5vw, 14px);
        font-size: clamp(0.6rem, 2vw, 0.7rem);
    }

    .movie-still, .comic-panel {
        min-width: clamp(80px, 20vw, 100px);
        height: clamp(50px, 12vw, 70px);
    }

    .comic-panel {
        height: clamp(80px, 20vw, 100px);
    }

    .mission-details, .threat-details {
        height: clamp(60px, 15vw, 120px);
    }
}

@media (max-width: 360px) {
    .intro-video video {
        width: 100vw;
        height: 100vh;
        object-fit: contain;
    }

    .sound-toggle {
        padding: clamp(4px, 1.2vw, 6px) clamp(8px, 2.5vw, 12px);
        font-size: clamp(0.55rem, 2vw, 0.7rem);
        bottom: 8px;
        right: 8px;
    }

    .hero-section h1 {
        font-size: clamp(1.2rem, 5.5vw, 2.5rem);
    }

    .hero-section p {
        font-size: clamp(0.7rem, 2.8vw, 0.9rem);
    }

    .character-card {
        max-width: min(95vw, 220px);
    }

    .character-image {
        max-height: clamp(90px, 18vw, 130px);
    }

    .mission-details, .threat-details {
        height: clamp(50px, 12vw, 100px);
    }
}