/* --- 细米兰阁 - 移动端专属样式 (mobile-style.css) --- */

/* 基础调整 */
body {
    padding: 0; /* 移除PC端的body内边距 */
}
#main-container {
    padding: 0 15px; /* 在主容器上设置左右内边距 */
}

/* 头部导航栏 - 移动端样式 */
#main-header {
    padding: 1rem 1.5rem;
    justify-content: space-between;
}
.desktop-nav {
    display: none; /* 隐藏桌面导航 */
}
.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
#hamburger-menu {
    display: block; /* 显示汉堡按钮 */
    background: none;
    border: none;
    color: var(--primary-text);
    cursor: pointer;
    padding: 5px;
}
.search-container {
    margin-left: 0;
}
.search-container.expanded .search-input-wrapper {
    max-width: 150px; /* 调整搜索框展开宽度 */
}

/* 全屏导航菜单 */
#mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}
#mobile-nav-overlay.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#mobile-nav-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--primary-text);
    font-size: 3rem;
    font-weight: 200;
    cursor: pointer;
}
.mobile-nav-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}
.mobile-nav-links li {
    margin-bottom: 2rem;
}
.mobile-nav-links a {
    color: var(--primary-text);
    text-decoration: none;
    font-size: 2rem;
    font-weight: 300;
    transition: color 0.3s ease;
}
.mobile-nav-links a:hover {
    color: var(--accent-color);
}

/* Hero区域调整 */
.hero-title {
    font-size: clamp(2.5rem, 15vw, 4rem); /* 调整字体大小 */
}
.hero-cta-container {
    flex-direction: column; /* 按钮垂直排列 */
    gap: 1rem;
    width: 100%;
    align-items: center;
}
.cta-link {
    width: 80%;
    max-width: 300px;
    text-align: center;
}

/* 应用区域布局 */
#main-features-section .feature-panel {
    padding: 5rem 1rem; /* 减少内边距 */
}
#main-features-section .feature-text h3 {
    font-size: clamp(2rem, 8vw, 2.5rem);
}
#main-features-section .feature-text p {
    font-size: 0.95rem;
}
.nav-grid {
    grid-template-columns: 1fr; /* 强制单列 */
    gap: 15px; /* 减小卡片间距 */
}
.nav-item.special-mytan {
    grid-column: span 1; /* MyTan卡片也变为单列 */
}

/* 应用分类标签 */
.app-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    margin: 2rem 0;
    padding-bottom: 10px;
    position: sticky;
    top: 70px; /* 调整吸顶位置，避免被header遮挡 */
    background: var(--bg-color);
    z-index: 8;
    border-bottom: 1px solid var(--border-color);
}
.app-tabs::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}
.tab-item {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--secondary-text);
    padding: 8px 18px;
    margin-right: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}
.tab-item.active {
    background-color: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* 其他区域单列布局 */
.about-content, .cmi-news-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
}
.about-text p, .cmi-news-text p {
    margin: 0 auto;
}
.about-visual, .cmi-news-visual {
    order: -1; /* 将图片/视觉元素置顶 */
    margin-bottom: 2rem;
}
.visual-shape {
    width: 200px;
    height: 200px;
}

/* 合作伙伴 */
.marquee-track span {
    font-size: 1.5rem;
    margin: 0 2rem;
}

/* 手机端提示弹窗 */
#mobile-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#mobile-alert-overlay.show {
    opacity: 1;
    visibility: visible;
}
.mobile-alert-content {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
#mobile-alert-overlay.show .mobile-alert-content {
    transform: scale(1);
}
.mobile-alert-content h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--primary-text);
}
.mobile-alert-content p {
    font-size: 0.95em;
    line-height: 1.6;
    color: var(--secondary-text);
    margin-bottom: 20px;
}
#mobile-alert-close {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    width: 100%;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
#mobile-alert-close:hover {
    opacity: 0.9;
}