body {
    margin: 0;
    padding: 0;
    background-color: #E0C69F;
    color: #333;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

svg {
    width: 100%;
    height: 100%;
    display: block;
    /* preserveAspectRatio is handled in HTML, but max-width ensures it doesn't get too distorted if we wanted to constrain it */
}

/* Navigation Hover Effects */
.nav-item {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-box: fill-box;
}

.nav-item:hover {
    filter: brightness(1.1) saturate(1.2);
    transform: translateX(5px); /* Slide the whole group */
}

/* Ensure rects don't have conflicting transforms */
.nav-item rect, .nav-item path {
    transition: none; /* Let the group handle the transition */
}


.nav-item text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: none; /* Removed shadow for cleaner look */
    fill: #F5F5F0; /* Match background for cut-out look or keep contrast */
}

/* Content Area inside ForeignObject */
.content-container {
    color: #333;
    padding: 30px;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
    font-size: 16px;
    font-weight: 300;
    background: #E0C69F;
    border-radius: 12px;
    border: 1px solid #CDB48D;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.content-container h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: #13818E;
    border-bottom: none;
    padding-bottom: 15px;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.content-container p {
    line-height: 1.8;
    margin-bottom: 1.5em;
}

.content-container ul {
    list-style-type: none;
    padding: 0;
}

.content-container ul li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Custom Scrollbar */
.content-container::-webkit-scrollbar {
    width: 6px;
}
.content-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
}
.content-container::-webkit-scrollbar-thumb {
    background: #13818E;
    border-radius: 10px;
}

/* Robot and Skeleton Animations */
@keyframes gunFire {
    0% { transform: translateX(0); }
    10% { transform: translateX(-8px); }
    20% { transform: translateX(0); }
    100% { transform: translateX(0); }
}

@keyframes muzzleFlash {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

@keyframes dartFly {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-180px); opacity: 1; }
}

@keyframes headRock {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    50% { transform: rotate(2deg); }
    75% { transform: rotate(-1deg); }
}

@keyframes skeletonRotate {
    0%, 100% { transform: translate(50px, 0) rotate(0deg); }
    20% { transform: translate(48px, -2px) rotate(-3deg); }
    40% { transform: translate(49px, 1px) rotate(2deg); }
    60% { transform: translate(48.5px, -1px) rotate(-1deg); }
    80% { transform: translate(49.5px, 0.5px) rotate(0.5deg); }
}

@keyframes bodyPartShake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-1px, -1px); }
    50% { transform: translate(1px, 1px); }
    75% { transform: translate(-0.5px, 0.5px); }
}

.robot-shooting #hand,
.robot-shooting #hand_2 {
    animation: gunFire 0.3s ease-out;
}

.robot-shooting #armcover {
    filter: brightness(2);
    animation: muzzleFlash 0.2s ease-out;
}

.dart-flying {
    animation: dartFly 0.4s linear forwards;
}

.skeleton-hit {
    animation: skeletonRotate 0.8s ease-out;
}

.skeleton-hit #head,
.skeleton-hit #head_2,
.skeleton-hit #head_3 {
    transform-origin: center;
    animation: headRock 0.6s ease-out;
}

.skeleton-hit #Vector_6,
.skeleton-hit #Vector_2 {
    animation: bodyPartShake 0.5s ease-out;
}

#Robot {
    cursor: pointer;
    transition: filter 0.2s;
}

#Robot:hover {
    filter: brightness(1.1);
}

/* Mobile/Desktop Display Control */
.mobile-only {
    display: none;
}

.desktop-only {
    display: flex;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    body {
        background-color: #F5F5F0;
        overflow-y: auto;
        height: auto;
    }

    .mobile-container {
        width: 100%;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .mobile-header {
        background: linear-gradient(135deg, #13818E 0%, #0a5c66 100%);
        color: white;
        padding: 20px;
        text-align: center;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .mobile-header h1 {
        margin: 0;
        font-size: 24px;
        font-weight: 800;
        letter-spacing: 1px;
    }

    .mobile-tagline {
        margin: 8px 0 0 0;
        font-size: 12px;
        opacity: 0.9;
        font-weight: 300;
    }

    .mobile-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 15px;
        background: white;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .mobile-nav-btn {
        flex: 1 1 calc(33.333% - 8px);
        min-width: 90px;
        padding: 12px 16px;
        background: #13818E;
        color: white;
        border: none;
        border-radius: 8px;
        font-family: 'Montserrat', sans-serif;
        font-size: 14px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        cursor: pointer;
        transition: all 0.3s;
        box-shadow: 0 2px 5px rgba(19, 129, 142, 0.2);
    }

    .mobile-nav-btn:active,
    .mobile-nav-btn.active {
        background: #0a5c66;
        transform: translateY(1px);
        box-shadow: 0 1px 3px rgba(19, 129, 142, 0.3);
    }

    .mobile-content {
        flex: 1;
        padding: 20px;
        background: #F5F5F0;
        overflow-y: auto;
    }

    .mobile-content h2 {
        color: #13818E;
        font-size: 22px;
        font-weight: 800;
        margin-top: 0;
        margin-bottom: 15px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-content h3 {
        color: #333;
        font-size: 18px;
        font-weight: 600;
        margin-top: 20px;
        margin-bottom: 10px;
    }

    .mobile-content p {
        line-height: 1.6;
        margin-bottom: 15px;
        color: #333;
    }

    .mobile-content ul {
        padding-left: 20px;
        margin-bottom: 15px;
    }

    .mobile-content li {
        margin-bottom: 8px;
        line-height: 1.5;
    }

    .mobile-content form {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 15px;
    }

    .mobile-content input,
    .mobile-content select,
    .mobile-content textarea {
        padding: 12px;
        border: 1px solid #ccc;
        border-radius: 8px;
        font-family: 'Montserrat', sans-serif;
        font-size: 14px;
    }

    .mobile-content button[type="submit"] {
        padding: 14px;
        background: #ff6600;
        color: white;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        font-size: 16px;
        cursor: pointer;
        transition: background 0.3s;
    }

    .mobile-content button[type="submit"]:active {
        background: #e55a00;
    }

    .mobile-footer {
        background: #13818E;
        color: white;
        padding: 20px;
        text-align: center;
        font-size: 12px;
    }

    .mobile-footer p {
        margin: 5px 0;
    }

    .mobile-footer a {
        color: white;
        text-decoration: none;
        font-weight: 600;
        font-size: 16px;
    }
}
