common.module.scss 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. .container {
  2. display: grid;
  3. height: 100vh;
  4. grid-template-rows: minmax(auto, 50px) 2fr auto;
  5. // PC (aside 없을 때 기본 2열)
  6. @media (min-width: 1124px) {
  7. grid-template-areas: "header header" "main chatAside" "footer chatAside";
  8. grid-template-columns: 1fr minmax(200px, 400px);
  9. }
  10. // PC (aside 있을 때 3열)
  11. @media (min-width: 1124px) {
  12. &:has(> .aside) {
  13. grid-template-areas: "header header header" "aside main chatAside" "aside footer chatAside";
  14. grid-template-columns: minmax(200px, 280px) 1fr minmax(200px, 400px);
  15. }
  16. }
  17. // 모바일/태블릿
  18. @media (max-width: 1125px) {
  19. grid-template-areas: "header" "main" "footer";
  20. grid-template-columns: 1fr;
  21. }
  22. > .header {
  23. grid-area: header;
  24. height: 56px;
  25. background: #f4f4f4;
  26. border-bottom: 1px solid #dedede;
  27. // 햄버거 메뉴 (모바일 전용)
  28. .hamburger {
  29. display: none;
  30. align-items: center;
  31. justify-content: center;
  32. width: 40px;
  33. height: 40px;
  34. border: none;
  35. background: transparent;
  36. cursor: pointer;
  37. font-size: 1.25rem;
  38. color: #333;
  39. flex-shrink: 0;
  40. &:hover {
  41. color: #000;
  42. }
  43. @media (max-width: 1125px) {
  44. display: flex;
  45. position: absolute;
  46. left: 8px;
  47. }
  48. }
  49. // 로고
  50. .logo {
  51. flex-basis: 137px;
  52. font-size: inherit;
  53. padding-right: 20px;
  54. flex-shrink: 0;
  55. }
  56. // PC 네비게이션 (모바일에서 숨김)
  57. .pcNav {
  58. display: flex;
  59. flex-grow: 1;
  60. align-items: center;
  61. justify-content: space-between;
  62. font-weight: 500;
  63. ul {
  64. display: flex;
  65. gap: 1rem;
  66. li {
  67. a, button {
  68. &:hover {
  69. font-weight: 700;
  70. text-decoration: underline;
  71. }
  72. }
  73. }
  74. }
  75. @media (max-width: 1125px) {
  76. display: none;
  77. }
  78. }
  79. // 채팅 토글 버튼 (모바일 전용)
  80. .chatToggle {
  81. display: none;
  82. align-items: center;
  83. justify-content: center;
  84. width: 40px;
  85. height: 40px;
  86. border: none;
  87. background: transparent;
  88. cursor: pointer;
  89. font-size: 1.25rem;
  90. color: #333;
  91. flex-shrink: 0;
  92. &:hover {
  93. color: #000;
  94. }
  95. @media (max-width: 1125px) {
  96. display: flex;
  97. position: absolute;
  98. right: 8px;
  99. }
  100. }
  101. .clock {
  102. background: #434343;
  103. color: #fff;
  104. padding: 5px;
  105. }
  106. // 모바일: 로고 가운데 정렬
  107. @media (max-width: 1125px) {
  108. position: relative;
  109. justify-content: center;
  110. }
  111. }
  112. // 좌측 사이드바 (코인 목록)
  113. > .aside {
  114. grid-area: aside;
  115. overflow-y: auto;
  116. transition: transform 0.3s ease;
  117. background: #fff;
  118. @media (min-width: 1124px) {
  119. position: relative;
  120. transform: translateX(0);
  121. border-right: 1px solid #dedede;
  122. }
  123. // 모바일: 왼쪽에서 슬라이드
  124. @media (max-width: 1125px) {
  125. position: fixed;
  126. top: 56px;
  127. left: 0;
  128. width: min(320px, 85vw);
  129. height: calc(100vh - 56px);
  130. z-index: 1000;
  131. transform: translateX(-100%);
  132. border-right: 1px solid #dedede;
  133. box-shadow: none;
  134. }
  135. }
  136. // 사이드바 열림 상태
  137. &.sidebarOpen {
  138. > .aside {
  139. @media (max-width: 1125px) {
  140. transform: translateX(0);
  141. box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
  142. }
  143. }
  144. > .overlay {
  145. @media (max-width: 1125px) {
  146. display: block;
  147. }
  148. }
  149. }
  150. // 메인 내용
  151. > .main {
  152. position: relative;
  153. grid-area: main;
  154. overflow-y: auto;
  155. border-bottom: 1px solid #dedede;
  156. @media (max-width: 1125px) {
  157. padding-bottom: 56px;
  158. }
  159. }
  160. // 우측 사이드바 (채팅)
  161. > .chatAside {
  162. grid-area: chatAside;
  163. transition: transform 0.3s ease;
  164. background: #fff;
  165. @media (min-width: 1124px) {
  166. position: relative;
  167. transform: translateX(0);
  168. border-left: 1px solid #dedede;
  169. }
  170. // 모바일: 우측에서 슬라이드
  171. @media (max-width: 1125px) {
  172. position: fixed;
  173. top: 56px;
  174. right: 0;
  175. width: min(400px, 100vw);
  176. height: calc(100vh - 56px - 56px);
  177. z-index: 1000;
  178. transform: translateX(100%);
  179. }
  180. }
  181. // 채팅 열림 상태
  182. &.chatOpen {
  183. > .chatAside {
  184. @media (max-width: 1125px) {
  185. transform: translateX(0);
  186. box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
  187. }
  188. }
  189. > .overlay {
  190. @media (max-width: 1125px) {
  191. display: block;
  192. }
  193. }
  194. }
  195. // 오버레이 (모바일)
  196. > .overlay {
  197. display: none;
  198. @media (max-width: 1125px) {
  199. position: fixed;
  200. top: 56px;
  201. left: 0;
  202. right: 0;
  203. bottom: 0;
  204. background: rgba(0, 0, 0, 0.4);
  205. z-index: 999;
  206. }
  207. }
  208. // 하단 내용
  209. > .footer {
  210. grid-area: footer;
  211. font-size: 0.688rem;
  212. padding: 4px;
  213. @media (max-width: 1125px) {
  214. padding-bottom: 56px;
  215. }
  216. @media (max-width: 576px) {
  217. > ol {
  218. padding: 0 0 2px 0;
  219. }
  220. }
  221. ol {
  222. display: flex;
  223. flex-flow: row;
  224. justify-content: space-between;
  225. li {
  226. // 이용약관
  227. // 개인정보처리방침
  228. &:nth-of-type(1),
  229. &:nth-of-type(2) {
  230. padding: 0 5px;
  231. &:hover {
  232. text-decoration: underline;
  233. font-weight: 600;
  234. }
  235. }
  236. &:nth-of-type(3) { // Copyright
  237. flex-grow: 0;
  238. margin-left: auto;
  239. }
  240. }
  241. }
  242. }
  243. // 모바일 하단 탭바
  244. > .bottomTab {
  245. display: none;
  246. @media (max-width: 1125px) {
  247. display: flex;
  248. position: fixed;
  249. bottom: 0;
  250. left: 0;
  251. right: 0;
  252. height: 56px;
  253. background: #fff;
  254. border-top: 1px solid #dedede;
  255. z-index: 1001;
  256. justify-content: space-around;
  257. align-items: center;
  258. a {
  259. display: flex;
  260. flex-direction: column;
  261. align-items: center;
  262. justify-content: center;
  263. gap: 2px;
  264. font-size: 0.625rem;
  265. color: #888;
  266. text-decoration: none;
  267. flex: 1;
  268. height: 100%;
  269. svg {
  270. font-size: 1.25rem;
  271. }
  272. &:hover {
  273. color: #555;
  274. }
  275. &.active {
  276. color: #333;
  277. font-weight: 600;
  278. }
  279. }
  280. }
  281. }
  282. // 페이지네이션
  283. #pagination {
  284. display: flex;
  285. flex-direction: row;
  286. flex-wrap: nowrap;
  287. justify-content: center;
  288. align-items: center;
  289. padding: 0.938rem 0 1.25rem 0;
  290. button {
  291. margin: 0 0.125rem;
  292. padding: 0.25rem 0.625rem;
  293. border-radius: 3px;
  294. &:hover {
  295. background: #f0f0f0;
  296. outline: 1px solid #dedede;
  297. }
  298. &.active {
  299. background: #f0f0f0;
  300. outline: 1px solid #b3b3b3;
  301. pointer-events: none;
  302. }
  303. }
  304. }
  305. }