/* ============================================
   强制全局使用手机端样式
   ============================================ */

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Poppins, "Noto Sans SC", sans-serif;
    background: linear-gradient(135deg, rgb(245, 247, 250) 0%, rgb(195, 207, 226) 100%);
    color: rgb(51, 51, 51);
    min-height: 100vh;
    padding: 8px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    box-shadow: rgba(0, 0, 0, 0.15) 0 20px 60px;
    overflow: hidden;
    padding: 12px;
    position: relative;
}

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.header h1 {
    font-size: 1.3rem;
    color: rgb(45, 52, 54);
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.header h1 i { color: rgb(231, 76, 60); }

.subtitle {
    font-size: 0.8rem;
    color: rgb(45, 52, 54);
    max-width: 800px;
    margin: 0 auto 15px;
    font-weight: 500;
}

/* 控制区域 */
.controls {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 15px;
}

.search-options { display: flex; justify-content: flex-start; }
.search-filters { display: flex; flex-flow: wrap; flex-direction: column; gap: 10px; width: 100%; }
.filter-group { display: flex; flex-flow: wrap; align-items: center; gap: 6px; }
.filter-label { font-weight: 600; color: rgb(45, 52, 54); min-width: auto; margin: 0 6px 0 0; font-size: 0.8rem; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

/* 按钮公共样式 */
.filter-btn, .filter-option-btn {
    cursor: pointer; transition: 0.3s; font-weight: 600;
    background: rgba(255, 255, 255, 0.25); backdrop-filter: blur(10px);
    border-radius: 50px; color: rgb(45, 52, 54);
}
.filter-btn:not(.active):hover, .filter-option-btn:not(.active):hover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.35);
}
.filter-btn.active, .filter-option-btn.active {
    background: rgba(108, 92, 231, 0.8);
    border-color: rgba(108, 92, 231, 0.9);
    color: white !important;
}
.filter-btn.active:hover, .filter-option-btn.active:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(108, 92, 231, 0.9);
}

.filter-btn { padding: 6px 12px; border: 2px solid rgba(255, 255, 255, 0.5); font-size: 0.8rem; }
.filter-option-btn { padding: 4px 8px; border: 1px solid rgba(255, 255, 255, 0.5); font-size: 0.75rem; margin: 0 4px 4px 0; }

/* 数字网格 */
.numbers-grid { display: none; grid-template-columns: repeat(12, 1fr); gap: 2px; margin-bottom: 15px; }
.numbers-grid.visible { display: grid; }

/* 卡片公共样式 */
.number-card, .divination-result .number-card, .recommendation-card {
    border-radius: 50%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: white;
    position: relative; overflow: hidden; box-shadow: rgba(0, 0, 0, 0.15) 0 8px 20px;
}
.number-card::before, .divination-result .number-card::before, .recommendation-card::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1; border-radius: 50%;
}

.number-card { aspect-ratio: 1 / 1; padding: 2px; cursor: pointer; transition: 0.4s; min-height: 0; }
.number-card:hover { transform: translateY(-10px) scale(1.05); box-shadow: rgba(0, 0, 0, 0.25) 0 15px 30px; }
.number { font-size: 0.7rem; font-weight: 600; z-index: 2; text-shadow: rgba(0, 0, 0, 0.3) 0 2px 10px; }

/* 隐藏星座 */
.zodiac, .zodiac-icon { display: none; }

/* 图例 */
.legend {
    background: rgba(255, 255, 255, 0.25); backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 16px;
    padding: 12px; margin-top: 15px;
}
.legend h2 { font-size: 1.1rem; margin-bottom: 12px; color: rgb(45, 52, 54); display: flex; align-items: center; gap: 10px; text-shadow: rgba(0, 0, 0, 0.1) 0 2px 10px; }
.legend h2 i { color: rgb(243, 156, 18); }
.legend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.legend-item {
    display: flex; align-items: center; padding: 8px; border-radius: 12px;
    background: rgba(255, 255, 255, 0.3); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4); box-shadow: rgba(0, 0, 0, 0.05) 0 4px 12px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.legend-item:hover { transform: translateY(-5px); box-shadow: rgba(0, 0, 0, 0.1) 0 8px 20px; }
.legend-text { flex: 1; }
.legend-text h4 { font-size: 1.1rem; margin-bottom: 4px; color: rgb(45, 52, 54); }
.legend-text p { font-size: 0.9rem; color: rgb(45, 52, 54); font-weight: 500; }
.legend-number { display: inline-block; margin-right: 2px; font-weight: bold; }
.legend.collapsed .legend-grid { display: none; }
.legend.collapsed .toggle-btn i { transform: rotate(-90deg); }
.toggle-btn { background: none; border: none; color: rgb(108, 92, 231); font-size: 0.9rem; cursor: pointer; margin-left: 8px; transition: transform 0.3s; }

/* 占卜区域 */
.divination-section {
    background: rgba(108, 92, 231, 0.25); backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 20px;
    padding: 15px; margin-bottom: 20px; text-align: center;
    box-shadow: rgba(0, 0, 0, 0.15) 0 12px 40px;
}
.divination-section h2 { font-size: 1.3rem; margin-bottom: 15px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.divination-section p { font-size: 0.9rem; margin-bottom: 25px; opacity: 0.95; }
.divination-btn {
    padding: 12px 24px; background: rgba(255, 255, 255, 0.25); backdrop-filter: blur(10px);
    color: white; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 50px;
    font-size: 1rem; font-weight: 700; cursor: pointer; transition: 0.3s;
    display: inline-flex; align-items: center; gap: 12px; box-shadow: rgba(0, 0, 0, 0.2) 0 8px 20px;
}
.divination-btn:hover { background: rgba(255, 255, 255, 0.35); transform: translateY(-5px); box-shadow: rgba(0, 0, 0, 0.3) 0 12px 25px; }
.divination-btn:active { transform: translateY(0); }

/* 占卜结果 */
.divination-result {
    margin-top: 30px; display: flex; flex-wrap: nowrap; overflow-x: auto;
    justify-content: center; align-items: center; gap: 8px; padding: 10px 5px;
    scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.divination-result::-webkit-scrollbar { height: 3px; }
.divination-result::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 3px; }

.divination-result .number-card {
    width: 48px; height: 48px; min-width: 48px; flex-shrink: 0;
    cursor: pointer; transition: transform 0.3s; margin: 0; padding: 0;
}
.divination-result .number-card .number {
    font-size: 0.9rem; font-weight: 700; line-height: 1; margin: 0; padding: 0;
    z-index: 2; text-shadow: rgba(0, 0, 0, 0.3) 0 2px 10px;
    display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
}
.divination-result .number-card .zodiac,
.divination-result .number-card .zodiac-icon { display: none; }
.divination-result .number-card:hover { transform: scale(1.1); }

/* 占卜卡片响应式 */
@media (max-width: 450px) {
    .divination-result .number-card { width: 42px; height: 42px; min-width: 42px; }
    .divination-result .number-card .number { font-size: 0.8rem; }
    .divination-result { gap: 6px; }
}
@media (max-width: 400px) {
    .divination-result .number-card { width: 38px; height: 38px; min-width: 38px; }
    .divination-result .number-card .number { font-size: 0.75rem; }
    .divination-result { gap: 5px; padding: 8px 3px; }
}
@media (max-width: 360px) {
    .divination-result .number-card { width: 34px; height: 34px; min-width: 34px; }
    .divination-result .number-card .number { font-size: 0.7rem; }
    .divination-result { gap: 4px; padding: 6px 2px; }
}
@media (max-width: 320px) {
    .divination-result .number-card { width: 30px; height: 30px; min-width: 30px; }
    .divination-result .number-card .number { font-size: 0.65rem; }
    .divination-result { gap: 3px; padding: 5px 2px; }
}

.divination-message { margin-top: 20px; font-size: 1rem; color: rgb(255, 234, 167); font-weight: 600; min-height: 24px; }

/* 推荐区域 */
.recommendation-section {
    background: rgba(255, 255, 255, 0.25); backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 20px;
    padding: 15px; margin-bottom: 20px; color: rgb(45, 52, 54);
    box-shadow: rgba(0, 0, 0, 0.1) 0 12px 40px;
}
.recommendation-section h2 { font-size: 1.3rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; color: rgb(45, 52, 54); }
.recommendation-section h2 i { color: rgb(231, 76, 60); }
.recommendation-section .subtitle { font-size: 0.9rem; color: rgb(99, 110, 114); margin-bottom: 25px; }
.recommendation-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(45px, 1fr)); gap: 6px; margin-bottom: 20px; }
.recommendation-card { width: 45px; height: 45px; padding: 8px; background: linear-gradient(135deg, rgb(108, 92, 231) 0%, rgb(162, 155, 254) 100%); }
.recommendation-card .number { font-size: 0.9rem; font-weight: 700; z-index: 2; text-shadow: rgba(0, 0, 0, 0.3) 0 2px 10px; line-height: 1; margin: 0; white-space: nowrap; }
.recommendation-card .count { font-size: 0.6rem; margin-top: 2px; z-index: 2; font-weight: 600; text-shadow: rgba(0, 0, 0, 0.3) 0 1px 5px; line-height: 1.2; }
.recommendation-info { text-align: center; font-size: 0.9rem; color: rgb(99, 110, 114); }
#recommendation-message { margin-top: 10px; font-weight: 600; color: rgb(0, 184, 148); }

/* 复制区域 */
.copy-section {
    display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 15px;
    background: rgba(255, 255, 255, 0.3); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 16px;
    padding: 20px; box-shadow: rgba(0, 0, 0, 0.1) 0 8px 20px;
}
.copy-btn {
    padding: 8px 16px; background: rgba(0, 184, 148, 0.8); backdrop-filter: blur(10px);
    color: white; border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 50px;
    font-weight: 700; font-size: 0.9rem; cursor: pointer; transition: 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: rgba(0, 184, 148, 0.5) 0 6px 20px; text-shadow: rgba(0, 0, 0, 0.3) 0 1px 3px;
}
.copy-btn:hover { background: rgba(0, 184, 148, 0.9); transform: translateY(-2px); box-shadow: rgba(0, 184, 148, 0.7) 0 6px 20px; }
.copy-btn:active { transform: translateY(0); }
.copy-feedback { font-size: 0.9rem; color: rgb(0, 184, 148); font-weight: 600; text-align: center; opacity: 0; transition: opacity 0.3s; }
.copy-feedback.show { opacity: 1; }

/* 设备标签 */
.device-tag, .copy-divination-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, 0.2); color: rgb(45, 52, 54);
    border-radius: 50px; backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.3);
}
.device-tag { padding: 5px 10px; margin-top: 15px; font-size: 0.8rem; font-weight: 500; }
.device-tag i { color: rgb(255, 234, 167); }
.copy-divination-btn { padding: 5px 10px; margin-top: 10px; margin-left: 5px; font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: 0.3s; }
.copy-divination-btn:hover { background: rgba(255, 255, 255, 0.3); transform: translateY(-2px); }

/* 页脚 */
footer { text-align: center; padding-top: 15px; border-top: 2px solid rgba(255, 255, 255, 0.3); color: rgb(45, 52, 54); font-size: 0.7rem; }
footer p { margin-bottom: 15px; }
footer i.fa-heart { color: rgb(231, 76, 60); }
.footer-links a { color: rgb(108, 92, 231); text-decoration: none; margin: 0 10px; font-weight: 600; transition: color 0.3s; }
.footer-links a:hover { color: rgb(162, 155, 254); }

/* ============================================
   弹窗样式
   ============================================ */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7); z-index: 1000;
    align-items: center; justify-content: center; padding: 15px;
}
.modal-content {
    background: rgba(255, 255, 255, 0.25); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 20px;
    width: 100%; max-width: 400px; margin: 0 auto; padding: 20px 18px;
    position: relative; animation: modalFadeIn 0.3s ease; color: white;
    max-height: 85vh; overflow-y: auto;
}
.modal-content::-webkit-scrollbar { width: 3px; }
.modal-content::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 3px; }
@keyframes modalFadeIn { 0% { opacity: 0; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1); } }
.close { position: absolute; top: 12px; right: 15px; font-size: 1.5rem; color: rgba(255, 255, 255, 0.7); cursor: pointer; transition: color 0.3s; z-index: 10; }
.close:hover { color: rgb(231, 76, 60); }
.modal-body { text-align: center; }
.modal-body h2 { font-size: 1.5rem; color: white; margin-bottom: 8px; text-shadow: rgba(0, 0, 0, 0.3) 0 2px 10px; }
.zodiac-icon-large { font-size: 2.8rem; color: rgb(255, 234, 167); margin: 8px 0; }
.modal-body h3 { font-size: 1.2rem; color: white; margin-bottom: 8px; text-shadow: rgba(0, 0, 0, 0.3) 0 2px 10px; }
#modal-description { font-size: 0.85rem; color: rgba(255, 255, 255, 0.9); margin-bottom: 15px; line-height: 1.45; }
.modal-details { text-align: left; background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 14px; padding: 12px 15px; margin-bottom: 15px; }
.modal-details p { margin-bottom: 8px; font-size: 0.8rem; line-height: 1.4; }
.modal-details strong { color: rgb(255, 234, 167); font-weight: 600; }
.modal-close-btn {
    padding: 10px 24px; background: rgba(108, 92, 231, 0.85); backdrop-filter: blur(10px);
    color: white; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 50px;
    font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: 0.3s;
    width: 100%; max-width: 200px; margin: 0 auto; display: block;
}
.modal-close-btn:hover { background: rgba(108, 92, 231, 1); transform: translateY(-2px); box-shadow: rgba(108, 92, 231, 0.4) 0 6px 15px; }
.modal-recommend { margin: 12px 0; text-align: center; }
.modal-recommend-btn {
    padding: 10px 20px; background: rgba(0, 184, 148, 0.85); backdrop-filter: blur(10px);
    color: white; border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 50px;
    font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: 0.3s;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; max-width: 180px;
}
.modal-recommend-btn:hover { background: rgba(0, 184, 148, 1); transform: translateY(-2px); }
.modal-recommend-btn:disabled { background: rgba(149, 165, 166, 0.6); cursor: not-allowed; transform: none; }
.modal-recommend-feedback { display: block; margin-top: 8px; font-size: 0.75rem; color: rgb(255, 234, 167); font-weight: 600; min-height: 20px; }

/* 捐赠弹窗 */
#donate-modal .modal-content { max-width: 350px; }
#donate-modal .modal-body h2 { font-size: 1.4rem; margin-bottom: 10px; }
#donate-modal .modal-body p { font-size: 0.85rem; margin-bottom: 15px; line-height: 1.5; }
.donate-qr-container { margin: 15px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.donate-qr-image { width: 160px; height: 160px; border-radius: 12px; box-shadow: rgba(0, 0, 0, 0.2) 0 8px 20px; border: 4px solid white; object-fit: cover; }
.donate-note { font-size: 0.75rem; color: rgba(255, 255, 255, 0.8); font-style: italic; }
.donate-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 15px; }
.donate-btn {
    padding: 10px 20px; background: rgba(108, 92, 231, 0.85); backdrop-filter: blur(10px);
    color: white; border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 50px;
    font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: 0.3s;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; max-width: 200px;
}
.donate-btn:hover { background: rgba(108, 92, 231, 1); transform: translateY(-2px); }
.donate-btn.secondary { background: rgba(149, 165, 166, 0.8); }
.donate-btn.secondary:hover { background: rgba(149, 165, 166, 1); }

/* 关于弹窗样式 */
.about-content {
    text-align: left;
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 5px;
    margin-bottom: 15px;
}

.about-content::-webkit-scrollbar {
    width: 3px;
}

.about-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.about-section {
    margin-bottom: 20px;
}

.about-section h3 {
    font-size: 1.1rem;
    color: rgb(255, 234, 167);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.about-section ul {
    padding-left: 20px;
    margin: 0;
}

.about-section li {
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 0.85rem;
}

.about-section p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.about-footer {
    text-align: center;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

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