/* 紧凑版样式 - 针对移动端优化 */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif; background: linear-gradient(135deg, #87CEEB 0%, #98FB98 100%); min-height: 100vh; padding: 8px; color: #1D1D1F; line-height: 1.4; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scrollbar-width: none; -ms-overflow-style: none; } body::-webkit-scrollbar, *::-webkit-scrollbar { display: none; } .container { max-width: 500px; margin: 0 auto; background: rgba(255, 255, 255, 0.9); border-radius: 16px; padding: 16px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); backdrop-filter: blur(15px) saturate(180%); border: 1px solid rgba(255, 255, 255, 0.3); } .header { text-align: center; margin-bottom: 20px; } .title { font-size: 1.5rem; color: #1D1D1F; margin-bottom: 6px; font-weight: 600; letter-spacing: -0.01em; } .subtitle { color: #86868B; font-size: 0.9rem; margin-bottom: 16px; font-weight: 400; } .form-section { margin-bottom: 20px; } .form-group { margin-bottom: 16px; } .form-label { display: block; margin-bottom: 6px; font-weight: 600; color: #1D1D1F; font-size: 0.9rem; } .form-input { width: 100%; padding: 10px 12px; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 8px; font-size: 0.9rem; transition: all 0.2s ease; background: rgba(255, 255, 255, 0.8); font-family: inherit; backdrop-filter: blur(8px); } .form-input:focus { outline: none; border-color: #007AFF; background: rgba(255, 255, 255, 0.95); box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15); } .textarea { resize: vertical; min-height: 80px; } .btn { width: 100%; padding: 12px; background: #007AFF; color: white; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; margin-bottom: 16px; box-shadow: 0 2px 6px rgba(0, 122, 255, 0.25); } .btn:hover { background: #0056CC; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0, 122, 255, 0.35); } .btn:active { transform: translateY(0); background: #004499; } .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; background: #86868B; } .result-section { margin-top: 20px; } .result-title { font-size: 1.1rem; color: #1D1D1F; margin-bottom: 12px; text-align: center; font-weight: 600; } .loading { display: none; text-align: center; color: #007AFF; font-style: normal; padding: 16px; font-weight: 500; } .poem-output, .result-container { background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 12px; padding: 16px; min-height: 120px; backdrop-filter: blur(8px); } .poem-output { white-space: pre-wrap; font-family: 'PingFang SC', 'Hiragino Sans GB', 'KaiTi', '楷体', serif; font-size: 1rem; line-height: 1.6; text-align: center; color: #1D1D1F; letter-spacing: 0.3px; } .result-container { display: grid; gap: 12px; grid-template-columns: 1fr; } .result-card { background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 10px; padding: 12px; backdrop-filter: blur(8px); } .card-title { font-size: 0.95rem; color: #1D1D1F; margin-bottom: 8px; font-weight: 600; } .score-display { font-size: 1.8rem; font-weight: 700; color: #007AFF; margin-bottom: 4px; text-align: center; } .score-desc { font-size: 0.85rem; color: #86868B; text-align: center; line-height: 1.3; } .meaning-content { font-size: 0.9rem; color: #1D1D1F; line-height: 1.5; } .suggestions-container { background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 12px; padding: 12px; min-height: 100px; backdrop-filter: blur(8px); display: grid; gap: 10px; grid-template-columns: 1fr; } .placeholder { text-align: center; color: #86868B; font-style: normal; padding: 20px 10px; font-weight: 400; font-size: 0.85rem; } .convention-group-title { font-size: 0.9rem; font-weight: 600; color: white; margin: 12px 0 8px 0; padding: 8px 12px; background: #007AFF; border-radius: 8px; text-align: center; box-shadow: 0 2px 6px rgba(0, 122, 255, 0.25); grid-column: 1 / -1; } .convention-group-title:first-child { margin-top: 0; } .suggestion-item { background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 8px; padding: 10px; margin-bottom: 0; transition: all 0.2s ease; cursor: pointer; position: relative; backdrop-filter: blur(8px); min-height: 60px; display: flex; flex-direction: column; justify-content: space-between; } .suggestion-item:hover { border-color: rgba(0, 122, 255, 0.3); box-shadow: 0 3px 10px rgba(0, 122, 255, 0.15); background: rgba(255, 255, 255, 0.95); } .variable-name { font-family: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace; font-size: 0.9rem; font-weight: 600; color: #1D1D1F; margin-bottom: 3px; word-break: break-all; } .variable-description { font-size: 0.8rem; color: #86868B; line-height: 1.3; flex-grow: 1; } .copy-btn { position: absolute; top: 6px; right: 6px; background: #007AFF; color: white; border: none; border-radius: 4px; padding: 3px 6px; font-size: 0.7rem; font-weight: 600; cursor: pointer; opacity: 0; transition: all 0.2s ease; box-shadow: 0 1px 3px rgba(0, 122, 255, 0.25); } .suggestion-item:hover .copy-btn { opacity: 1; } .copy-btn:hover { background: #0056CC; transform: translateY(-1px); } .error { color: #FF3B30; background: rgba(255, 59, 48, 0.1); border: 1px solid rgba(255, 59, 48, 0.2); padding: 12px; border-radius: 8px; margin-top: 12px; font-weight: 500; backdrop-filter: blur(8px); font-size: 0.85rem; } .success-toast { position: fixed; top: 15px; right: 15px; background: #34C759; color: white; padding: 8px 16px; border-radius: 8px; box-shadow: 0 4px 16px rgba(52, 199, 89, 0.3); z-index: 1000; opacity: 0; transform: translateX(100%); transition: all 0.3s ease; font-weight: 600; backdrop-filter: blur(15px); font-size: 0.85rem; } .success-toast.show { opacity: 1; transform: translateX(0); } /* 移动端优化 */ @media (max-width: 480px) { body { padding: 4px; } .container { padding: 12px; border-radius: 12px; } .title { font-size: 1.3rem; } .subtitle { font-size: 0.85rem; margin-bottom: 12px; } .form-group { margin-bottom: 12px; } .form-input { padding: 8px 10px; font-size: 0.85rem; } .textarea { min-height: 70px; } .btn { padding: 10px; font-size: 0.85rem; } .result-section { margin-top: 16px; } .poem-output, .result-container, .suggestions-container { padding: 12px; min-height: 100px; } .poem-output { font-size: 0.9rem; } .result-card { padding: 10px; } .suggestion-item { padding: 8px; min-height: 50px; } .variable-name { font-size: 0.85rem; } .variable-description { font-size: 0.75rem; } .copy-btn { position: static; opacity: 1; margin-top: 4px; width: 100%; padding: 4px 6px; font-size: 0.7rem; } } /* 动画效果 */ @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } .suggestion-item, .result-card { animation: fadeIn 0.3s ease; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } .loading { animation: pulse 1.5s ease-in-out infinite; }