style.css 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. @font-face {
  2. font-family: 'number';
  3. src: url("DIN1451.ttf");
  4. }
  5. * {
  6. margin: 0;
  7. padding: 0;
  8. touch-action: none;
  9. }
  10. #contain {
  11. width: 100vw;
  12. max-width: 500px;
  13. height: 100vh;
  14. background: #232323;
  15. margin: 0 auto;
  16. }
  17. .header {
  18. background: #2a2a2a;
  19. width: 100%;
  20. min-height: 80px;
  21. }
  22. .footer {
  23. background: #2a2a2a;
  24. width: 100%;
  25. max-width: 500px;
  26. min-height: 60px;
  27. position: fixed;
  28. bottom: 0;
  29. left: 50%;
  30. transform: translateX(-50%);
  31. display: flex;
  32. align-items: center;
  33. justify-content: center;
  34. }
  35. #ball-count {
  36. color: #aaa;
  37. font-size: 1.2em;
  38. font-family: 'number', monospace;
  39. }
  40. #level {
  41. position: absolute;
  42. top: 0;
  43. left: 0;
  44. color: #fff;
  45. font-size: 3em;
  46. width: 100%;
  47. text-align: center;
  48. }
  49. body {
  50. background: #232323;
  51. }
  52. /* 覆盖层通用样式 */
  53. .overlay {
  54. position: fixed;
  55. top: 0;
  56. left: 0;
  57. width: 100vw;
  58. height: 100vh;
  59. background: rgba(0, 0, 0, 0.75);
  60. display: flex;
  61. align-items: center;
  62. justify-content: center;
  63. z-index: 100;
  64. }
  65. .overlay-content {
  66. background: #2a2a2a;
  67. border-radius: 12px;
  68. padding: 32px 28px;
  69. text-align: center;
  70. min-width: 240px;
  71. max-width: 90vw;
  72. }
  73. .overlay-title {
  74. color: #fff;
  75. font-size: 1.5em;
  76. margin-bottom: 24px;
  77. font-weight: normal;
  78. }
  79. .mode-btn {
  80. display: block;
  81. width: 100%;
  82. padding: 14px 0;
  83. margin-bottom: 12px;
  84. border: none;
  85. border-radius: 8px;
  86. background: #f8b42b;
  87. color: #000;
  88. font-size: 1.1em;
  89. font-weight: bold;
  90. cursor: pointer;
  91. transition: background 0.2s;
  92. }
  93. .mode-btn:last-child {
  94. margin-bottom: 0;
  95. }
  96. .mode-btn:hover {
  97. background: #e8a020;
  98. }
  99. .mode-btn:active {
  100. background: #d09018;
  101. }
  102. .final-score {
  103. color: #f8b42b;
  104. font-size: 2em;
  105. margin-bottom: 24px;
  106. font-family: 'number', monospace;
  107. }