activity.css 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. * {
  2. margin: 0;
  3. padding: 0;
  4. box-sizing: border-box;
  5. }
  6. * {
  7. -webkit-tap-highlight-color: transparent;
  8. /* 顺手优化长按菜单(需要可跳过) */
  9. -webkit-touch-callout: none;
  10. -webkit-user-select: none;
  11. user-select: none;
  12. }
  13. body {
  14. font-family:
  15. -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  16. min-height: 100vh;
  17. padding-bottom: env(safe-area-inset-bottom);
  18. }
  19. /* 在 :root 中定义全局变量,方便复用 */
  20. :root {
  21. --safe-area-inset-top: env(safe-area-inset-top, 0px);
  22. --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  23. }
  24. /* 1. 为页面主体添加安全区内边距 */
  25. body {
  26. padding-top: var(--safe-area-inset-top);
  27. padding-bottom: var(--safe-area-inset-bottom);
  28. }
  29. .loading-overlay,
  30. .error-overlay {
  31. position: fixed;
  32. top: 0;
  33. left: 0;
  34. right: 0;
  35. bottom: 0;
  36. background: rgba(0, 0, 0, 0.7);
  37. display: flex;
  38. align-items: center;
  39. justify-content: center;
  40. z-index: 1000;
  41. backdrop-filter: blur(4px);
  42. }
  43. .loading-content,
  44. .error-content {
  45. display: flex;
  46. flex-direction: column;
  47. align-items: center;
  48. gap: 12px;
  49. padding: 32px;
  50. background: #1a1a1a;
  51. border-radius: 12px;
  52. border: 1px solid #2c2c2c;
  53. }
  54. .loading-spinner {
  55. width: 40px;
  56. height: 40px;
  57. border: 3px solid rgba(245, 166, 35, 0.2);
  58. border-top-color: #f5a623;
  59. border-radius: 50%;
  60. animation: spin 1s linear infinite;
  61. }
  62. @keyframes spin {
  63. to {
  64. transform: rotate(360deg);
  65. }
  66. }
  67. .loading-text,
  68. .error-text {
  69. font-size: 14px;
  70. color: #fff;
  71. }
  72. .error-icon {
  73. width: 40px;
  74. height: 40px;
  75. background: #ff4444;
  76. border-radius: 50%;
  77. display: flex;
  78. align-items: center;
  79. justify-content: center;
  80. font-size: 24px;
  81. font-weight: bold;
  82. color: #fff;
  83. }
  84. .error-retry {
  85. padding: 10px 24px;
  86. background: linear-gradient(135deg, #f5a623, #ff6b35);
  87. border: none;
  88. border-radius: 8px;
  89. color: #fff;
  90. font-size: 14px;
  91. font-weight: 500;
  92. cursor: pointer;
  93. transition: opacity 0.3s ease;
  94. }
  95. .error-retry:hover {
  96. opacity: 0.9;
  97. }
  98. .error-retry:active {
  99. transform: scale(0.98);
  100. }