* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #432456;
    background-image: linear-gradient(135deg, #432456 0%, #5a3069 100%);
    color: #fff;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    padding-top: calc(10vh);
}

.container {
    width: 1500px;
    height: 781px;
    max-width: 100%;
    max-height: 100vh;
    background-color: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
}

nav {
    padding: 25px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

nav a {
    margin-right: 38px;
    margin-bottom: 12px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    position: relative;
    font-size: 20px;
}

nav a[href="../pages/3D.html"] {
    text-decoration: underline;
    text-underline-offset: 6px;
}

#content-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.content-area {
    width: 100%;
    height: 100%;
    display: flex;
    padding: 0 25px 25px;
}

.left-content {
    flex: 1;
    padding-right: 25px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInRight 0.8s ease-out forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.english-title {
    font-size: 32px;
    color: #333;
    font-weight: bold;
    letter-spacing: 0px;
    margin-bottom: 15px;
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.4s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 3D Model Container Styles */
.model-container {
    width: 100%;
    height: 80%;
    position: relative;
    overflow: hidden;
    background-color: #474747;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
    opacity: 0;
    animation: zoomIn 0.7s ease-out 0.6s forwards;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.iframe-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
}

.model-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}
/* Remove the full overlay style since we don't need it */
.click-interceptor-overlay {
    display: none;
}

/* Update the click interceptor styles */
.click-interceptor {
    position: absolute;
    z-index: 10;
    cursor: default;
    pointer-events: all;
    background-color: transparent;
}

.top-interceptor {
    top: 0;
    left: 0;
    width: 100%;
    height: 40px; /* Height to cover just the tabs */
}

.bottom-interceptor {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
}

.right-interceptor {
    top: 40px; /* Position below the top interceptor */
    right: 0;
    width: 40px; /* Width to cover just the right side buttons */
    height: calc(100% - 80px); /* Cover from below top to above bottom */
}

.slide-controls {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 15px 0;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.8s forwards;
}

.control-btn {
    display: inline-block;
    background-color: #73264d;
    color: white;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    margin-top: 5px;
}

.control-btn:hover {
    background-color: #5a1d3d;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slide-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
    font-weight: bold;
}

/* Right Content Styles */
.right-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    opacity: 0;
    transform: translateX(30px);
    animation: slideInLeft 0.8s ease-out forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.image-container {
    width: 300px;
    height: 450px;
    background-color: white;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.6s forwards;
    margin-bottom: 25px;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.model-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.caption {
    margin-top: 7px;
    font-size: 18px;
    color: #333;
    text-align: center;
    line-height: 1.6;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.8s forwards;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(248, 248, 248, 0.7);
    z-index: 5;
    flex-direction: column;
}

.loading-text {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    font-weight: bold;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #73264d;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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

/* Button row styles */
.button-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 1s forwards;
}

.action-btn {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.action-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.cosplay-btn {
    background-color: #3498db;
}

.cosplay-btn:hover {
    background-color: #2980b9;
}

.meme-btn {
    background-color: #e74c3c;
}

.meme-btn:hover {
    background-color: #c0392b;
}

/* Future message styles */
.future-msg {
    margin-top: 15px;
    font-size: 14px;
    color: #e74c3c;
    text-align: center;
    line-height: 1.4;
    max-width: 400px;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 1.2s forwards;
}

/* Ad Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.popup-container {
    background-color: white;
    border-radius: 15px;
    padding: 10px;
    width: 95%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.9);
    transition: transform 0.5s ease-in-out;
}

.ad-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.popup-title {
    font-size: 23px;
    color: #333;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.ads-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.ad-container {
    width: 300px;
    height: 250px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    overflow: hidden;
    position: relative;
}

/* Show animation for popup */
.popup-overlay.show {
    opacity: 1;
    display: flex;
}

.popup-overlay.show .popup-container {
    transform: scale(1);
}

/* Responsive styles */
@media screen and (max-width: 1500px) {
    .container {
        width: 100%;
        height: auto;
        aspect-ratio: 1500/781;
    }
}

@media screen and (max-width: 830px) {
    body {
        padding-top: 5vh;
        min-height: 100vh;
        height: auto;
        position: relative;
    }
    
    .container {
        aspect-ratio: auto;
        height: auto;
        min-height: 700px;
        max-height: none;
    }
    
    nav {
        justify-content: center;
    }
    
    #content-container {
        flex: 1;
        min-height: 600px;
        height: auto;
        overflow-y: visible;
    }
    
    .content-area {
        flex-direction: column;
        padding: 0 15px 20px;
        height: auto;
        overflow: visible;
    }
    
    .left-content {
        padding-right: 0;
        margin-bottom: 10px;
        text-align: center;
        flex: none;
    }

    .english-title {
        font-size: 35px;
    }
    
    .model-container {
        height: 430px;
        margin-bottom: 20px;
    }
    
    .control-btn {
        padding: 10px 25px;
        font-size: 16px;
    }
    
    .right-content {
        flex: none;
        height: auto;
        padding: 5px 0;
        overflow: visible;
        display: flex;
        flex-direction: column;
    }
    
    /* Reorder elements in right-content for mobile */
    .right-content .button-row {
        order: 1;
        margin-bottom: 20px;
        margin-top: 0;
    }
    
    .right-content .image-container {
        order: 2;
        width: 200px;
        height: 300px;
    }
    
    .right-content .caption {
        order: 3;
    }
    
    .right-content .future-msg {
        order: 4;
    }
    
    #content-container {
        flex: 1;
        min-height: 600px;
    }
    
    /* Adjust button row for mobile */
    .button-row {
        flex-wrap: nowrap;
        gap: 10px;
    }
    
    .action-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    /* Adjust popup for mobile */
    .popup-container {
        padding: 15px;
        max-width: 340px;
    }
    
    .ads-container {
        flex-direction: column;
        gap: 10px;
    }

    .future-msg {
        font-size: 12px;
        max-width: 300px;
    }
    
    .mobile-hide {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .container {
        border-radius: 15px;
        min-height: 650px;
        height: auto;
        overflow: visible;
    }
    
    nav a {
        margin-right: 15px;
        font-size: 14px;
    }     
    
    .english-title {
        font-size: 22px;
        margin-bottom: 10px;
    }
    
    .model-container {
        height: 390px;
    }
    
    .control-btn {
        padding: 8px 20px;
        font-size: 14px;
    }
    
    .slide-counter {
        font-size: 14px;
    }
    
    .image-container {
        width: 180px;
        height: 270px;
    }
    
    .caption {
        font-size: 12px;
    }
    
    #content-container {
        min-height: 550px;
        height: auto;
        overflow: visible;
    }
    
    /* Further adjust button row for smaller screens */
    .action-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .popup-title {
        font-size: 21px;
        margin-bottom: 15px;
        margin-top: 15px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .future-msg {
        font-size: 11px;
        max-width: 280px;
    }
}
