custom.css 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. /* 自定义CSS样式 */
  2. :root {
  3. /* 主色调 */
  4. --color-primary: #4A6FE3; /* 活力蓝 */
  5. --color-secondary-orange: #FF9500; /* 温暖橙 */
  6. --color-secondary-green: #2DCE89; /* 轻松绿 */
  7. /* 中性色 */
  8. --color-gray-100: #F8F9FA;
  9. --color-gray-200: #E9ECEF;
  10. --color-gray-300: #DEE2E6;
  11. --color-gray-500: #6C757D;
  12. --color-gray-800: #343A40;
  13. /* 功能色 */
  14. --color-success: #28A745;
  15. --color-danger: #DC3545;
  16. --color-warning: #FFC107;
  17. /* 字体 */
  18. --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  19. }
  20. /* 设备屏幕样式 */
  21. .iphone-frame {
  22. width: 100%;
  23. height: 100%;
  24. position: relative;
  25. overflow: hidden;
  26. background-color: white;
  27. display: flex;
  28. flex-direction: column;
  29. }
  30. /* iOS状态栏样式 */
  31. .ios-status-bar {
  32. height: 44px;
  33. padding: 0 16px;
  34. display: flex;
  35. justify-content: space-between;
  36. align-items: center;
  37. font-size: 14px;
  38. font-weight: 600;
  39. background-color: white;
  40. color: #000;
  41. position: relative;
  42. }
  43. .ios-status-bar .time {
  44. position: absolute;
  45. left: 50%;
  46. transform: translateX(-50%);
  47. }
  48. .ios-status-bar .right {
  49. display: flex;
  50. align-items: center;
  51. }
  52. .ios-status-bar .right .signal,
  53. .ios-status-bar .right .wifi,
  54. .ios-status-bar .right .battery {
  55. margin-left: 6px;
  56. }
  57. /* 底部Tab Bar样式 */
  58. .ios-tab-bar {
  59. height: 83px;
  60. background-color: rgba(255, 255, 255, 0.95);
  61. border-top: 1px solid var(--color-gray-200);
  62. display: flex;
  63. justify-content: space-around;
  64. padding-bottom: 25px; /* 适应底部安全区域 */
  65. }
  66. .ios-tab-bar .tab-item {
  67. display: flex;
  68. flex-direction: column;
  69. align-items: center;
  70. justify-content: center;
  71. font-size: 10px;
  72. color: var(--color-gray-500);
  73. width: 25%;
  74. padding-top: 8px;
  75. }
  76. .ios-tab-bar .tab-item.active {
  77. color: var(--color-primary);
  78. }
  79. .ios-tab-bar .tab-item i {
  80. font-size: 22px;
  81. margin-bottom: 2px;
  82. }
  83. /* 内容区域 */
  84. .app-content {
  85. flex: 1;
  86. overflow-y: auto;
  87. background-color: #F8F9FA;
  88. position: relative;
  89. }
  90. /* 卡片样式 */
  91. .app-card {
  92. background-color: white;
  93. border-radius: 10px;
  94. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  95. margin-bottom: 16px;
  96. overflow: hidden;
  97. }
  98. /* 按钮样式 */
  99. .app-button {
  100. display: flex;
  101. align-items: center;
  102. justify-content: center;
  103. height: 40px;
  104. padding: 0 15px;
  105. border-radius: 5px;
  106. font-size: 16px;
  107. font-weight: 500;
  108. cursor: pointer;
  109. transition: all 0.2s ease;
  110. }
  111. .app-button.primary {
  112. background-color: var(--color-primary);
  113. color: white;
  114. }
  115. .app-button.secondary {
  116. background-color: var(--color-secondary-orange);
  117. color: white;
  118. }
  119. .app-button.green {
  120. background-color: var(--color-secondary-green);
  121. color: white;
  122. }
  123. .app-button.outline {
  124. border: 1px solid var(--color-primary);
  125. color: var(--color-primary);
  126. background-color: transparent;
  127. }
  128. /* 输入框样式 */
  129. .app-input {
  130. height: 40px;
  131. border-radius: 5px;
  132. border: 1px solid var(--color-gray-300);
  133. padding: 0 10px;
  134. font-size: 14px;
  135. width: 100%;
  136. outline: none;
  137. }
  138. .app-input:focus {
  139. border-color: var(--color-primary);
  140. }
  141. /* 导航栏样式 */
  142. .app-navbar {
  143. height: 44px;
  144. display: flex;
  145. align-items: center;
  146. justify-content: center;
  147. position: relative;
  148. border-bottom: 1px solid var(--color-gray-200);
  149. background-color: white;
  150. }
  151. .app-navbar .title {
  152. font-size: 18px;
  153. font-weight: 600;
  154. }
  155. .app-navbar .left-button,
  156. .app-navbar .right-button {
  157. position: absolute;
  158. font-size: 16px;
  159. display: flex;
  160. align-items: center;
  161. }
  162. .app-navbar .left-button {
  163. left: 16px;
  164. }
  165. .app-navbar .right-button {
  166. right: 16px;
  167. }
  168. /* 标签导航 */
  169. .app-tabs {
  170. display: flex;
  171. border-bottom: 1px solid var(--color-gray-200);
  172. background-color: white;
  173. }
  174. .app-tabs .tab {
  175. flex: 1;
  176. height: 40px;
  177. display: flex;
  178. align-items: center;
  179. justify-content: center;
  180. font-size: 14px;
  181. color: var(--color-gray-500);
  182. position: relative;
  183. }
  184. .app-tabs .tab.active {
  185. color: var(--color-primary);
  186. font-weight: 500;
  187. }
  188. .app-tabs .tab.active:after {
  189. content: "";
  190. position: absolute;
  191. bottom: 0;
  192. left: 25%;
  193. width: 50%;
  194. height: 2px;
  195. background-color: var(--color-primary);
  196. }
  197. /* 游戏卡片样式 */
  198. .game-card {
  199. background-color: white;
  200. border-radius: 10px;
  201. overflow: hidden;
  202. margin-bottom: 16px;
  203. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  204. }
  205. .game-card-image {
  206. width: 100%;
  207. height: 140px;
  208. background-size: cover;
  209. background-position: center;
  210. }
  211. .game-card-content {
  212. padding: 12px;
  213. }
  214. .game-card-title {
  215. font-size: 16px;
  216. font-weight: 600;
  217. margin-bottom: 6px;
  218. }
  219. .game-card-info {
  220. display: flex;
  221. font-size: 12px;
  222. color: var(--color-gray-500);
  223. }
  224. .game-card-badge {
  225. font-size: 10px;
  226. padding: 2px 6px;
  227. border-radius: 3px;
  228. margin-right: 6px;
  229. }
  230. /* 玩家头像样式 */
  231. .player-avatar {
  232. width: 40px;
  233. height: 40px;
  234. border-radius: 50%;
  235. overflow: hidden;
  236. background-color: var(--color-gray-200);
  237. }
  238. .player-avatar img {
  239. width: 100%;
  240. height: 100%;
  241. object-fit: cover;
  242. }
  243. /* 海龟汤游戏样式 */
  244. .turtle-soup-card {
  245. background-color: var(--color-gray-100);
  246. border-radius: 10px;
  247. padding: 16px;
  248. margin-bottom: 16px;
  249. }
  250. .turtle-soup-title {
  251. font-size: 18px;
  252. font-weight: 600;
  253. margin-bottom: 12px;
  254. }
  255. .turtle-soup-content {
  256. font-size: 14px;
  257. line-height: 1.5;
  258. margin-bottom: 16px;
  259. }
  260. .turtle-soup-clues {
  261. margin-top: 16px;
  262. }
  263. .turtle-soup-clue {
  264. background-color: white;
  265. border-radius: 6px;
  266. padding: 10px;
  267. margin-bottom: 8px;
  268. font-size: 13px;
  269. border-left: 3px solid var(--color-primary);
  270. }
  271. /* 对话气泡样式 */
  272. .chat-container {
  273. padding: 10px;
  274. }
  275. .chat-bubble {
  276. max-width: 80%;
  277. margin-bottom: 10px;
  278. padding: 10px 12px;
  279. border-radius: 18px;
  280. position: relative;
  281. font-size: 14px;
  282. line-height: 1.4;
  283. }
  284. .chat-bubble.left {
  285. border-bottom-left-radius: 4px;
  286. background-color: var(--color-gray-200);
  287. color: black;
  288. align-self: flex-start;
  289. margin-right: auto;
  290. }
  291. .chat-bubble.right {
  292. border-bottom-right-radius: 4px;
  293. background-color: var(--color-primary);
  294. color: white;
  295. align-self: flex-end;
  296. margin-left: auto;
  297. }
  298. /* 房间代码样式 */
  299. .room-code {
  300. font-size: 24px;
  301. font-weight: 700;
  302. letter-spacing: 5px;
  303. text-align: center;
  304. margin: 24px 0;
  305. color: var(--color-primary);
  306. }
  307. /* 动画效果 */
  308. @keyframes fadeIn {
  309. from {
  310. opacity: 0;
  311. }
  312. to {
  313. opacity: 1;
  314. }
  315. }
  316. .fade-in {
  317. animation: fadeIn 0.3s ease;
  318. }
  319. /* 付费功能卡片样式 */
  320. .premium-card {
  321. background-color: white;
  322. border-radius: 10px;
  323. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  324. overflow: hidden;
  325. margin-bottom: 16px;
  326. border: 2px solid var(--color-secondary-orange);
  327. }
  328. .premium-header {
  329. background-color: var(--color-secondary-orange);
  330. color: white;
  331. padding: 10px;
  332. font-weight: 600;
  333. text-align: center;
  334. }
  335. .premium-content {
  336. padding: 12px;
  337. }
  338. .premium-price {
  339. font-size: 18px;
  340. font-weight: 700;
  341. color: var(--color-secondary-orange);
  342. text-align: right;
  343. margin-top: 8px;
  344. }
  345. /* 进度条样式 */
  346. .progress-bar {
  347. height: 6px;
  348. border-radius: 3px;
  349. background-color: var(--color-gray-200);
  350. overflow: hidden;
  351. margin: 12px 0;
  352. }
  353. .progress-bar .progress {
  354. height: 100%;
  355. background-color: var(--color-primary);
  356. transition: width 0.3s ease;
  357. }
  358. /* 通用间距 */
  359. .app-padding {
  360. padding: 16px;
  361. }
  362. /* 全屏覆盖层 */
  363. .overlay {
  364. position: fixed;
  365. top: 0;
  366. left: 0;
  367. right: 0;
  368. bottom: 0;
  369. background-color: rgba(0, 0, 0, 0.5);
  370. display: flex;
  371. align-items: center;
  372. justify-content: center;
  373. z-index: 1000;
  374. }
  375. /* 模态框样式 */
  376. .modal {
  377. background-color: white;
  378. border-radius: 15px;
  379. width: 80%;
  380. max-width: 320px;
  381. padding: 20px;
  382. animation: fadeIn 0.2s ease;
  383. }
  384. .modal-title {
  385. font-size: 18px;
  386. font-weight: 600;
  387. margin-bottom: 12px;
  388. text-align: center;
  389. }
  390. .modal-content {
  391. margin-bottom: 16px;
  392. }
  393. .modal-actions {
  394. display: flex;
  395. justify-content: space-between;
  396. }