/* Global Responsive Images Styles */
/* 确保所有图片在移动端正确显示 */

/* 基础图片响应式设置 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Hero区域图片 */
.hero-image {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.3);
    border: 2px solid rgba(0, 255, 255, 0.5);
}

/* 内容区域图片 */
.content-image {
    width: 100%;
    overflow: hidden;
}

.content-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 255, 255, 0.3);
    object-fit: cover;
}

/* 内容块中的图片 */
.content-block img {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* 网格项目中的图片 */
.grid-item img {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Logo图片特殊处理 */
.logo img,
.logo-img {
    width: auto;
    height: 32px;
    max-width: 150px;
}

/* 防止图片溢出容器 */
* {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

main {
    overflow-x: hidden;
}

.section {
    overflow-x: hidden;
}

/* 移动端样式优化 */
@media (max-width: 768px) {
    /* Hero图片 */
    .hero-image {
        margin-top: 2rem;
    }

    .hero-image img {
        border-radius: 10px;
    }

    /* 内容图片 */
    .content-image img {
        border-radius: 10px;
    }

    /* 内容块在移动端改为单列 */
    .content-block {
        display: block !important;
        padding: 2rem 1rem !important;
    }

    .content-block > div {
        width: 100% !important;
        margin-bottom: 1.5rem;
    }

    /* 确保所有图片容器不超出屏幕 */
    .content-block .content-image,
    .content-block .content-text {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* Logo在移动端更小 */
    .logo img,
    .logo-img {
        height: 28px;
    }
}

@media (max-width: 480px) {
    /* 超小屏幕进一步优化 */
    .hero-image img,
    .content-image img {
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 255, 255, 0.2);
    }

    .content-block {
        padding: 1.5rem 0.75rem !important;
    }

    .logo img,
    .logo-img {
        height: 26px;
    }
}

/* 修复特定页面的图片问题 */
/* 产品展示图片 */
.product-image,
.game-image,
.casino-image {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.product-image img,
.game-image img,
.casino-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* 修复可能的flex容器问题 */
.hero-content {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr !important;
        padding: 0 1rem;
    }

    .hero-text,
    .hero-image {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* 确保所有section不溢出 */
section {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* 修复任何绝对定位的图片 */
img[style*="position: absolute"] {
    max-width: 100% !important;
}

/* 确保内联样式的图片也响应式 */
img[style*="width"] {
    max-width: 100% !important;
    height: auto !important;
}

/* 防止大尺寸固定宽度 */
[style*="width: 500px"],
[style*="width: 600px"],
[style*="width: 700px"],
[style*="width: 800px"],
[style*="width: 900px"],
[style*="width: 1000px"] {
    max-width: 100% !important;
    width: 100% !important;
}

/* 重置所有可能导致溢出的padding和margin */
@media (max-width: 768px) {
    * {
        max-width: 100vw;
    }

    .section {
        padding: 2rem 1rem !important;
    }

    .hero {
        padding: 60px 1rem 1rem !important;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 1.5rem 0.75rem !important;
    }

    .hero {
        padding: 50px 0.75rem 0.75rem !important;
    }
}