/* 移动端优先的样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background: var(--bg-color);
    min-height: 100vh;
    padding-bottom: env(safe-area-inset-bottom);
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* 移动端头部 */
.mobile-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 20px 16px;
    text-align: center;
}

.header-content h1 {
    font-size: 1.4rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.header-content h1 i {
    margin-right: 8px;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 主要内容区域 */
.mobile-main {
    padding: 16px;
}

.mobile-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.section-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 16px;
}

/* 分类网格 - 移动端优化 */
.mobile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.mobile-card {
    padding: 20px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-card:active {
    transform: scale(0.98);
}

.mobile-card.selected {
    border-color: var(--primary-color);
    background: rgba(52, 152, 219, 0.05);
}

.category-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.mobile-card h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.mobile-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

.select-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.mobile-card.selected .select-indicator {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 建议输入区域 */
.suggestion-input {
    display: none;
}

.suggestion-input.active {
    display: block;
}

.mobile-input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-tag {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 表单样式 */
.mobile-form-group {
    margin-bottom: 20px;
}

.mobile-input {
    position: relative;
}

textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    min-height: 160px;
    line-height: 1.5;
    background: var(--bg-color);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.mobile-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    color: var(--text-light);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 8px;
}

/* 按钮样式 */
.mobile-actions {
    display: flex;
    gap: 12px;
}

.mobile-btn {
    flex: 1;
    padding: 14px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:active {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-color);
}

.btn-secondary:active {
    background: #dee2e6;
}

/* 改进的使用说明 */
.instructions-steps {
    margin: 20px 0;
}

.step-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.step-item:last-child {
    border-bottom: none;
}

.step-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.step-content p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

.step-arrow {
    color: var(--text-light);
    margin-left: 12px;
}

/* 温馨提示框 */
.tips-box {
    background: rgba(52, 152, 219, 0.05);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.tip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.tip-header i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.tip-header h4 {
    font-size: 1rem;
    font-weight: 600;
}

.tip-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.tip-item i {
    color: var(--primary-color);
    width: 16px;
    flex-shrink: 0;
}

/* 移动端页脚 */
.mobile-footer {
    background: var(--card-bg);
    padding: 20px 16px;
    border-top: 1px solid var(--border-color);
}

.privacy-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
}

.privacy-notice i {
    color: var(--primary-color);
}

.mobile-beian {
    text-align: center;
}

.beian-link, .icp-beian a {
    font-size: 0.8rem;
    color: var(--text-light);
    text-decoration: none;
}

.beian-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
}

.beian-icon {
    width: 14px;
    height: 14px;
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 90%;
    text-align: center;
}

.message.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.message.success {
    background: var(--secondary-color);
}

.message.error {
    background: #e74c3c;
}

/* 横屏适配 */
@media (min-width: 768px) {
    .container {
        max-width: 400px;
        margin: 0 auto;
    }
}

/* 防止微信调整字体大小 */
body {
    -webkit-text-size-adjust: 100%;
}

/* 每日名言样式 */
.daily-quote {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.quote-content {
    flex: 1;
}

.quote-icon {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.quote-text {
    color: white;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 8px;
    font-style: italic;
}

.quote-author {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    text-align: right;
}

.quote-refresh {
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    transition: all 0.3s ease;
}

.quote-refresh:hover {
    color: white;
    transform: rotate(180deg);
}

/* 功能入口 */
.feature-entries {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.feature-entry {
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.feature-entry:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* 消息样式 */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 90%;
    text-align: center;
}

.message.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.message.success {
    background: #27ae60;
}

.message.error {
    background: #e74c3c;
}