style.css 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  1. * {
  2. margin: 0;
  3. padding: 0;
  4. -moz-box-sizing: border-box;
  5. -webkit-box-sizing: border-box;
  6. box-sizing: border-box; }
  7. html {
  8. font-size: 100%;
  9. overflow-y: auto;
  10. -webkit-overflow-scrolling: touch;
  11. -webkit-tap-highlight-color: transparent;
  12. -webkit-text-size-adjust: 100%;
  13. -ms-text-size-adjust: 100%; }
  14. ::-moz-selection {
  15. background: #261e26;
  16. color: #fefefe;
  17. text-shadow: none; }
  18. ::selection {
  19. background: #261e26;
  20. color: #fefefe;
  21. text-shadow: none; }
  22. .clearfix:before,
  23. .clearfix:after {
  24. content: " ";
  25. display: table; }
  26. .clearfix:after {
  27. clear: both; }
  28. .clearfix {
  29. zoom: 1; }
  30. footer, header, section {
  31. display: block; }
  32. body, html {
  33. color: #424242;
  34. font-family: 'Open Sans', sans-serif;
  35. background: #fefefe;
  36. font-size: 16px;
  37. line-height: 1.5;
  38. font-weight: 400; }
  39. a {
  40. font-size: 1rem;
  41. color: #299cad;
  42. text-decoration: underline; }
  43. a:hover {
  44. color: #2eafc2;
  45. text-decoration: none;
  46. -moz-transition: all 0.2s ease-in-out;
  47. -webkit-transition: all 0.2s ease-in-out;
  48. -o-transition: all 0.2s ease-in-out;
  49. -ms-transition: all 0.2s ease-in-out;
  50. transition: all 0.2s ease-in-out; }
  51. a:focus {
  52. outline: none; }
  53. p {
  54. text-align: left;
  55. margin-bottom: 1em;
  56. font-size: 1rem; }
  57. h1.knight {
  58. height: 45px;
  59. width: 45px;
  60. background: url("../images/king.svg") no-repeat;
  61. margin: 50px auto 10px; }
  62. h2 {
  63. font-weight: 400;
  64. font-size: 2rem;
  65. text-align: center;
  66. color: #423443;
  67. margin-bottom: 0.5em; }
  68. h3 {
  69. font-weight: 600;
  70. font-size: 1.5rem;
  71. margin: 1em 0 0.5em 0;
  72. color: #503f51; }
  73. .alpha {
  74. font-size: 1.125rem; }
  75. .center {
  76. text-align: center !important; }
  77. .margin-fifty {
  78. margin: 50px 0; }
  79. .last-origin {
  80. background: #8cd8e4 !important; }
  81. .last-target {
  82. background: #77d1df !important; }
  83. #modal-mask, #offer-mask {
  84. display: none;
  85. cursor: pointer;
  86. position: fixed;
  87. top: 0;
  88. height: 100%;
  89. width: 100%;
  90. background: #444;
  91. background: rgba(0, 0, 0, 0.7);
  92. z-index: 10; }
  93. #modal-mask > p, #offer-mask > p {
  94. color: #eee;
  95. margin: 2em; }
  96. #modal-mask > p strong, #offer-mask > p strong {
  97. color: #fff; }
  98. #modal-window, #offer-window {
  99. width: 420px;
  100. height: 180px;
  101. position: fixed;
  102. background: #fff;
  103. top: 50%;
  104. left: 50%;
  105. margin-left: -210px;
  106. margin-top: -90px;
  107. border: 8px solid #5e4a60;
  108. box-shadow: 0 10px 30px #333;
  109. cursor: auto;
  110. z-index: 15; }
  111. #modal-window p, #offer-window p {
  112. text-align: center;
  113. padding: 1.5em; }
  114. #modal-window .button:active, #offer-window .button:active {
  115. top: auto;
  116. bottom: calc(1em + 1px); }
  117. #modal-window .button {
  118. position: absolute;
  119. left: 50%;
  120. bottom: 1em;
  121. margin-left: -60px; }
  122. #offer-window .button {
  123. position: absolute;
  124. bottom: 1em; }
  125. #offer-window #offer-accept {
  126. right: 4em; }
  127. #offer-window #offer-decline {
  128. left: 4em; }
  129. .chat {
  130. text-decoration: none;
  131. color: #777;
  132. margin-right: 1em;
  133. line-height: 50px;
  134. float: right !important;
  135. cursor: pointer;
  136. font-weight: 600; }
  137. .chat:hover {
  138. color: #cecece; }
  139. .chat:hover .new-message {
  140. color: #d12521; }
  141. .chat img {
  142. vertical-align: middle; }
  143. .chat .new-message {
  144. color: #d12521;
  145. padding-right: 1em; }
  146. header {
  147. margin: 0 auto;
  148. max-width: 800px;
  149. width: 100%;
  150. height: 50px; }
  151. #clock {
  152. width: 148px;
  153. height: 50px;
  154. position: absolute;
  155. text-align: center;
  156. border: 4px solid #e6e3e0; }
  157. #clock li {
  158. width: 70px;
  159. display: inline-block;
  160. line-height: 42px;
  161. opacity: .9;
  162. position: absolute; }
  163. #clock li.white {
  164. left: 0;
  165. color: #424242;
  166. background: #fff; }
  167. #clock li.black {
  168. right: 0;
  169. color: #fff;
  170. background: #424242; }
  171. #clock li.ticking {
  172. z-index: 1;
  173. font-size: 1.125rem;
  174. opacity: 1;
  175. box-shadow: 0 0 5px #e6e3e0;
  176. -webkit-transform: scale(1.2);
  177. -moz-transform: scale(1.2);
  178. -o-transform: scale(1.2);
  179. -ms-transform: scale(1.2);
  180. transform: scale(1.2);
  181. -moz-transition: all 0.2s ease-in-out;
  182. -webkit-transition: all 0.2s ease-in-out;
  183. -o-transition: all 0.2s ease-in-out;
  184. -ms-transition: all 0.2s ease-in-out;
  185. transition: all 0.2s ease-in-out; }
  186. span#game-type {
  187. position: absolute;
  188. line-height: 50px;
  189. margin-left: 175px;
  190. opacity: 0.9; }
  191. #container_wrapper {
  192. max-width: 960px;
  193. width: 100%;
  194. height: auto;
  195. padding: 1em 2em;
  196. margin: 0 auto;
  197. clear: both; }
  198. #container {
  199. width: 100%;
  200. min-height: 600px;
  201. margin: 0px 0px 20px 0px;
  202. float: left; }
  203. #form {
  204. width: 100%;
  205. height: 200px;
  206. margin: 0 auto; }
  207. #form fieldset {
  208. border: 0;
  209. text-align: left;
  210. margin-top: 1em;
  211. margin-left: 250px;
  212. width: 80%; }
  213. #form fieldset input {
  214. margin-left: 1em;
  215. width: 70px;
  216. outline: none;
  217. height: 40px;
  218. line-height: 30px;
  219. padding-left: 1em;
  220. font-size: 1.125rem;
  221. color: #424242;
  222. border: 2px solid #2b222c;
  223. }
  224. #form fieldset label {
  225. position: relative; }
  226. #form fieldset label:before {
  227. position: absolute;
  228. content: '';
  229. top: 0;
  230. right: 2em;
  231. margin-top: -2.5em;
  232. font-size: 0.75rem; }
  233. input.game_link {
  234. width: 70%;
  235. height: 50px;
  236. line-height: 50px;
  237. font-size: 1.125rem;
  238. color: #000;
  239. border: 2px solid #2b222c;
  240. padding: 0 1em;
  241. float: right;
  242. margin-right:80px;
  243. margin-bottom: 1em;
  244. }
  245. .game_link:hover {
  246. background: #f1f1f1;
  247. border: 2px solid #2b222c;
  248. -moz-transition: all 0.2s ease-in-out;
  249. -webkit-transition: all 0.2s ease-in-out;
  250. -o-transition: all 0.2s ease-in-out;
  251. -ms-transition: all 0.2s ease-in-out;
  252. transition: all 0.2s ease-in-out; }
  253. .game_link:focus {
  254. color: #222; }
  255. .button {
  256. background: white;
  257. width: 15%;
  258. height: 50px;
  259. display: block;
  260. border: 2px solid #2b222c;
  261. font-size: 1.125rem;
  262. color: #000;
  263. cursor: pointer;
  264. float: right;
  265. position: relative;
  266. }
  267. .button:hover {
  268. background: #de322e;
  269. -moz-transition: all 0.2s ease-in-out;
  270. -webkit-transition: all 0.2s ease-in-out;
  271. -o-transition: all 0.2s ease-in-out;
  272. -ms-transition: all 0.2s ease-in-out;
  273. transition: all 0.2s ease-in-out; }
  274. .button:active {
  275. top: 1px; }
  276. a.button {
  277. width: 120px;
  278. line-height: 46px;
  279. text-align: center;
  280. text-decoration: none; }
  281. a.button:hover {
  282. color: white; }
  283. .resign, .rematch {
  284. margin-right: 10px; }
  285. .button--red {
  286. background: white;
  287. border-color: #000;
  288. margin-right: 10px; }
  289. .button--red:hover {
  290. background: #de322e;
  291. -moz-transition: all 0.2s ease-in-out;
  292. -webkit-transition: all 0.2s ease-in-out;
  293. -o-transition: all 0.2s ease-in-out;
  294. -ms-transition: all 0.2s ease-in-out;
  295. transition: all 0.2s ease-in-out; }
  296. .rematch {
  297. display: none; }
  298. p#waiting {
  299. font-size: 1.275rem;
  300. color: #bb211e;
  301. width: 100%;
  302. text-align: center;
  303. margin: 10px 0px;
  304. display: none;
  305. float: left; }
  306. footer {
  307. font-size: 1rem;
  308. width: 100%;
  309. line-height: 2em;
  310. text-align: center;
  311. background: #dad7d2;
  312. border-bottom: 4px solid #c3beb6;
  313. box-shadow: inset 0 -4px #c3beb6; }
  314. footer a {
  315. color: #6d665a; }
  316. footer a:hover {
  317. color: #7b7365; }
  318. #footer {
  319. margin: 0 auto;
  320. max-width: 960px;
  321. padding: 3em 2em 1em 2em; }
  322. #sounds_label {
  323. width: 800px;
  324. height: 30px;
  325. line-height: 30px;
  326. display: block;
  327. margin: 0px 0px 5px 0px;
  328. float: left; }
  329. /* Chat */
  330. #chat-wrapper {
  331. display: none;
  332. position: absolute;
  333. width: 270px;
  334. right: 10px;
  335. top: 99px;
  336. border: 4px solid #fff;
  337. background: #e6e3e0; }
  338. #chat-wrapper h4 {
  339. font-size: 1.225rem;
  340. height: 3em;
  341. line-height: 3em;
  342. margin: 5px 5%;
  343. text-align: center;
  344. color: #423443; }
  345. #chat-wrapper a.close {
  346. position: absolute;
  347. top: 0;
  348. right: 0;
  349. background: #423443;
  350. color: #fff;
  351. font-size: 1.125rem;
  352. padding: 0 7px;
  353. text-decoration: none;
  354. font-weight: 600;
  355. margin: 1em 5%;
  356. cursor: pointer; }
  357. #chat-wrapper a.close:hover {
  358. text-decoration: none;
  359. background: #503f51; }
  360. #chat-wrapper > span {
  361. font-size: .9rem;
  362. margin: 5px 5%;
  363. display: block; }
  364. ul#chat {
  365. position: relative;
  366. top: 0;
  367. max-height: 300px;
  368. width: 100%;
  369. overflow-y: scroll;
  370. list-style-type: none; }
  371. ul#chat li {
  372. font-size: .9rem;
  373. padding: 10px;
  374. margin: 5px auto;
  375. width: 90%;
  376. border-radius: 5px;
  377. position: relative; }
  378. ul#chat li:before {
  379. position: absolute;
  380. content: '';
  381. top: 10px; }
  382. ul#chat li.black {
  383. background: #424242;
  384. color: #fff; }
  385. ul#chat li.white {
  386. background: #fff;
  387. color: #444; }
  388. ul#chat li.left:before {
  389. left: 0;
  390. margin-left: -7px;
  391. border-bottom: 7px solid transparent;
  392. border-top: 7px solid transparent; }
  393. ul#chat li.black.left:before {
  394. border-right: 7px solid #424242; }
  395. ul#chat li.white.left:before {
  396. border-right: 7px solid #fff; }
  397. ul#chat li.right:before {
  398. right: 0;
  399. margin-right: -7px;
  400. border-bottom: 7px solid transparent;
  401. border-top: 7px solid transparent; }
  402. ul#chat li.black.right:before {
  403. border-left: 7px solid #424242; }
  404. ul#chat li.white.right:before {
  405. border-left: 7px solid #fff; }
  406. #sendMessage input {
  407. width: 100%;
  408. padding: 15px 10px;
  409. border: none;
  410. outline: none;
  411. font-size: .9rem;
  412. border: 4px solid #e6e3e0; }
  413. #sendMessage input.black {
  414. background: #444;
  415. color: #fff; }
  416. #sendMessage input.white {
  417. background: #fff;
  418. color: #444; }
  419. /* Captured pieces */
  420. #captured-pieces {
  421. position: absolute;
  422. width: 100px;
  423. margin-left: -100px;
  424. font-size: 2rem;
  425. line-height: 2rem;
  426. height: 517px;
  427. overflow-y: auto; }
  428. #captured-pieces ul {
  429. width: 50px;
  430. min-height: 5px;
  431. float: left;
  432. display: block;
  433. text-align: center; }
  434. #captured-pieces ul li {
  435. list-style-type: none; }
  436. /* Chessboard */
  437. #board_moves_wrapper {
  438. width: 100%;
  439. max-width: 800px;
  440. min-height: 600px;
  441. margin: 0 auto; }
  442. table#moves {
  443. overflow-x: hidden;
  444. overflow-y: auto;
  445. width: 270px;
  446. height: 518px;
  447. background: #e6e3e0;
  448. box-shadow: inset 0 -4px #dad7d2;
  449. margin-left: 10px;
  450. border-radius: 2px;
  451. border-bottom: 4px solid #dad7d2;
  452. display: block;
  453. float: left; }
  454. #moves thead {
  455. width: 270px;
  456. height: 3em;
  457. line-height: 3em;
  458. font-size: 1.225rem;
  459. color: #423443;
  460. float: left;
  461. text-align: center; }
  462. #moves thead th, #moves thead tr {
  463. width: 100%;
  464. text-align: center;
  465. float: left; }
  466. #moves tbody tr {
  467. width: 270px;
  468. float: left; }
  469. #moves tbody tr td {
  470. width: 105px;
  471. text-align: left;
  472. line-height: 20px;
  473. margin: 0 15px;
  474. float: left; }
  475. #board_wrapper {
  476. float: left; }
  477. .chess_board {
  478. border: 8px solid #5e4a60;
  479. border-radius: 2px;
  480. width: 500px;
  481. height: 500px;
  482. float: left; }
  483. .chess_board tr {
  484. width: 500px;
  485. height: 62.5px;
  486. float: left;
  487. display: block; }
  488. .chess_board tr td {
  489. width: 62.5px;
  490. height: 62.5px;
  491. line-height: 62.5px;
  492. text-align: center;
  493. background: #fefefe;
  494. display: block;
  495. float: left; }
  496. .chess_board tr td.moving {
  497. background: #ef9e9c !important; }
  498. .chess_board tr td a {
  499. width: 62.5px;
  500. height: 62.5px;
  501. font-size: 3.5rem;
  502. color: #424242;
  503. text-decoration: none;
  504. display: block;
  505. cursor: pointer; }
  506. .chess_board tr:nth-child(odd) td:nth-child(even),
  507. .chess_board tr:nth-child(even) td:nth-child(odd) {
  508. background: #dad7d2; }
  509. span.feedback {
  510. color: #424242;
  511. line-height: 28px;
  512. text-indent: 28px;
  513. margin-top: 1em;
  514. display: block;
  515. clear: left;
  516. float: left; }
  517. .feedback-status {
  518. font-weight: bold; }
  519. span.whitefeedback {
  520. background: url("../images/whiteking.png") 0% 50% no-repeat; }
  521. span.blackfeedback {
  522. background: url("../images/blackking.png") 0% 50% no-repeat; }
  523. span.promotion {
  524. line-height: 28px;
  525. text-indent: 28px;
  526. margin-top: 1em;
  527. display: block;
  528. float: right; }
  529. .chess_board td.selected {
  530. background: #ef9e9c !important; }
  531. /* Media queries */
  532. @media only screen and (min-width: 760px) and (max-width: 900px) {
  533. header, #board_moves_wrapper {
  534. max-width: 760px; }
  535. #sounds_label {
  536. max-width: 530px; }
  537. #container_wrapper {
  538. max-width: 900px;
  539. padding: 1em 10px; }
  540. table#moves {
  541. margin-left: 0;
  542. float: right;
  543. height: 516px; }
  544. table#moves, #moves thead, #moves tbody tr {
  545. width: 200px; }
  546. #moves tbody tr td {
  547. width: 90px;
  548. margin: 0 5px; } }
  549. @media only screen and (min-width: 1400px) {
  550. #chat-wrapper {
  551. display: block; } }
  552. @media only screen and (max-width: 999px) {
  553. #captured-pieces {
  554. display: none; } }
  555. @media only screen and (min-width: 530px) and (max-width: 759px) {
  556. header, #board_moves_wrapper, #sounds_label {
  557. max-width: 530px; } }
  558. @media only screen and (max-width: 759px) {
  559. html {
  560. font-size: 14px; }
  561. #form fieldset {
  562. width: 100%;
  563. text-align: center; }
  564. #form fieldset label {
  565. display: block;
  566. line-height: 45px;
  567. padding-left: 0; }
  568. #form fieldset label:before {
  569. margin-left: -7em;
  570. margin-top: 0;
  571. right: auto; }
  572. span#game-type {
  573. display: none; }
  574. #container_wrapper {
  575. max-width: 759px;
  576. padding: 1em 5px; }
  577. span.feedback {
  578. float: right;
  579. clear: none; }
  580. table#moves {
  581. margin-left: 0;
  582. margin-top: 0.5em;
  583. height: 258px; } }
  584. @media only screen and (max-width: 529px) {
  585. header, #board_moves_wrapper, #sounds_label {
  586. max-width: 470px; }
  587. input.game_link {
  588. font-size: 1rem; }
  589. ul#clock {
  590. width: 118px; }
  591. ul#clock li {
  592. width: 55px; }
  593. #container_wrapper {
  594. max-width: 529px;
  595. padding: 1em 5px; }
  596. .chess_board {
  597. border: 4px solid #5e4a60;
  598. width: 456px;
  599. height: 456px; }
  600. .chess_board tr {
  601. width: 456px;
  602. height: 57px; }
  603. .chess_board tr td {
  604. width: 57px;
  605. height: 57px;
  606. line-height: 57px; }
  607. .chess_board tr td a {
  608. width: 57px;
  609. height: 57px;
  610. font-size: 3.5rem; } }