style.css 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  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: 122px;
  59. width: 122px;
  60. background: url("../images/knight.png") no-repeat;
  61. margin: 2em auto 0.5em auto; }
  62. h2 {
  63. font-family: 'Cherry Swash';
  64. font-weight: 400;
  65. font-size: 2rem;
  66. text-align: center;
  67. color: #423443;
  68. margin-bottom: 0.5em; }
  69. h3 {
  70. font-weight: 600;
  71. font-size: 1.5rem;
  72. margin: 1em 0 0.5em 0;
  73. color: #503f51; }
  74. .alpha {
  75. font-size: 1.125rem; }
  76. .center {
  77. text-align: center !important; }
  78. .margin-fifty {
  79. margin: 50px 0; }
  80. .last-origin {
  81. background: #8cd8e4 !important; }
  82. .last-target {
  83. background: #77d1df !important; }
  84. #modal-mask {
  85. display: none;
  86. cursor: pointer;
  87. position: fixed;
  88. top: 0;
  89. height: 100%;
  90. width: 100%;
  91. background: #444;
  92. background: rgba(0, 0, 0, 0.7);
  93. z-index: 10; }
  94. #modal-window {
  95. width: 420px;
  96. height: 180px;
  97. position: fixed;
  98. background: #fff;
  99. top: 50%;
  100. left: 50%;
  101. margin-left: -210px;
  102. margin-top: -90px;
  103. border: 8px solid #5e4a60;
  104. box-shadow: 0 10px 30px #333;
  105. cursor: auto;
  106. z-index: 15; }
  107. #modal-window p {
  108. text-align: center;
  109. padding: 1.5em; }
  110. #modal-window .button {
  111. position: absolute;
  112. left: 50%;
  113. bottom: 1em;
  114. margin-left: -60px; }
  115. #modal-window .button:active {
  116. top: auto;
  117. bottom: calc(1em + 1px); }
  118. .chat {
  119. text-decoration: none;
  120. color: #248a99;
  121. margin-right: 1em;
  122. line-height: 50px;
  123. float: right !important;
  124. cursor: pointer;
  125. font-weight: 600; }
  126. .chat:hover {
  127. color: #299cad; }
  128. .chat:hover .new-message {
  129. color: #d12521; }
  130. .chat img {
  131. vertical-align: middle; }
  132. .chat .new-message {
  133. color: #d12521;
  134. padding-right: 1em; }
  135. header {
  136. margin: 0 auto;
  137. max-width: 800px;
  138. width: 100%;
  139. height: 50px; }
  140. #clock {
  141. width: 148px;
  142. height: 50px;
  143. position: absolute;
  144. text-align: center;
  145. border: 4px solid #e6e3e0; }
  146. #clock li {
  147. width: 70px;
  148. display: inline-block;
  149. line-height: 42px;
  150. opacity: .9;
  151. position: absolute; }
  152. #clock li.white {
  153. left: 0;
  154. color: #424242;
  155. background: #fff; }
  156. #clock li.black {
  157. right: 0;
  158. color: #fff;
  159. background: #424242; }
  160. #clock li.ticking {
  161. z-index: 1;
  162. font-size: 1.125rem;
  163. opacity: 1;
  164. box-shadow: 0 0 5px #e6e3e0;
  165. -webkit-transform: scale(1.2);
  166. -moz-transform: scale(1.2);
  167. -o-transform: scale(1.2);
  168. -ms-transform: scale(1.2);
  169. transform: scale(1.2);
  170. -moz-transition: all 0.2s ease-in-out;
  171. -webkit-transition: all 0.2s ease-in-out;
  172. -o-transition: all 0.2s ease-in-out;
  173. -ms-transition: all 0.2s ease-in-out;
  174. transition: all 0.2s ease-in-out; }
  175. span#game-type {
  176. position: absolute;
  177. line-height: 50px;
  178. margin-left: 175px;
  179. opacity: 0.9; }
  180. #container_wrapper {
  181. max-width: 960px;
  182. width: 100%;
  183. height: auto;
  184. padding: 1em 2em;
  185. margin: 0 auto;
  186. clear: both; }
  187. #container {
  188. width: 100%;
  189. min-height: 600px;
  190. margin: 0px 0px 20px 0px;
  191. float: left; }
  192. #form {
  193. width: 100%;
  194. height: 200px;
  195. margin: 0 auto; }
  196. #form fieldset {
  197. border: 0;
  198. text-align: right;
  199. margin-bottom: 1em;
  200. width: 80%; }
  201. #form fieldset input {
  202. margin-left: 1em;
  203. width: 100px;
  204. outline: none;
  205. height: 40px;
  206. line-height: 30px;
  207. padding-left: 1em;
  208. font-size: 1.125rem;
  209. color: #424242;
  210. border: 2px solid #2b222c;
  211. border-left: 4px solid #2eafc2; }
  212. #form fieldset label {
  213. position: relative; }
  214. #form fieldset label:before {
  215. position: absolute;
  216. content: 'Up to 50';
  217. top: 0;
  218. right: 2em;
  219. margin-top: -2.5em;
  220. font-size: 0.75rem; }
  221. input, button {
  222. font-family: 'Open Sans'; }
  223. input.game_link {
  224. width: 80%;
  225. height: 50px;
  226. line-height: 50px;
  227. font-size: 1.125rem;
  228. color: #fff;
  229. border: 0;
  230. border-bottom: 2px solid #2b222c;
  231. border-left: 4px solid #2eafc2;
  232. text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  233. background: #423443;
  234. padding: 0 1em;
  235. float: left;
  236. border-radius: 2px;
  237. box-shadow: inset 0 -2px #2b222c; }
  238. .game_link:hover {
  239. background: #4a3b4c;
  240. border-bottom: 2px solid #3a2d3a;
  241. box-shadow: inset 0 -2px #3a2d3a;
  242. -moz-transition: all 0.2s ease-in-out;
  243. -webkit-transition: all 0.2s ease-in-out;
  244. -o-transition: all 0.2s ease-in-out;
  245. -ms-transition: all 0.2s ease-in-out;
  246. transition: all 0.2s ease-in-out; }
  247. .game_link:focus {
  248. color: #eee; }
  249. .button {
  250. width: 15%;
  251. height: 50px;
  252. display: block;
  253. font-size: 1.125rem;
  254. border-radius: 2px;
  255. border: 0;
  256. border-bottom: 2px solid #299cad;
  257. text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  258. background: #2eafc2;
  259. color: white;
  260. cursor: pointer;
  261. float: right;
  262. box-shadow: inset 0 -2px #299cad;
  263. position: relative; }
  264. .button:hover {
  265. background: #39bdd0;
  266. border-bottom: 2px solid #2ca8ba;
  267. box-shadow: inset 0 -2px #2ca8ba;
  268. -moz-transition: all 0.2s ease-in-out;
  269. -webkit-transition: all 0.2s ease-in-out;
  270. -o-transition: all 0.2s ease-in-out;
  271. -ms-transition: all 0.2s ease-in-out;
  272. transition: all 0.2s ease-in-out; }
  273. .button:active {
  274. top: 1px; }
  275. a.button {
  276. width: 120px;
  277. line-height: 46px;
  278. text-align: center;
  279. text-decoration: none; }
  280. a.button:hover {
  281. color: white; }
  282. .resign {
  283. background: #d12521;
  284. border-color: #bb211e;
  285. box-shadow: inset 0 -2px #bb211e;
  286. margin-right: 10px; }
  287. .resign:hover {
  288. background: #de322e;
  289. border-bottom: 2px solid #c82320;
  290. box-shadow: inset 0 -2px #c82320;
  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. p#waiting {
  297. font-family: 'Cherry Swash';
  298. font-size: 1.275rem;
  299. color: #bb211e;
  300. width: 100%;
  301. text-align: center;
  302. margin: 15px 0px 0px 0px;
  303. display: none;
  304. float: left; }
  305. footer {
  306. font-size: 1rem;
  307. width: 100%;
  308. line-height: 2em;
  309. text-align: center;
  310. background: #dad7d2;
  311. border-bottom: 4px solid #c3beb6;
  312. box-shadow: inset 0 -4px #c3beb6; }
  313. footer a {
  314. color: #6d665a; }
  315. footer a:hover {
  316. color: #7b7365; }
  317. #footer {
  318. margin: 0 auto;
  319. max-width: 960px;
  320. padding: 3em 2em 1em 2em; }
  321. #sounds_label {
  322. width: 800px;
  323. height: 30px;
  324. line-height: 30px;
  325. display: block;
  326. margin: 0px 0px 5px 0px;
  327. float: left; }
  328. /* Chat */
  329. #chat-wrapper {
  330. display: none;
  331. position: absolute;
  332. width: 270px;
  333. right: 10px;
  334. top: 99px;
  335. border: 4px solid #fff;
  336. background: #e6e3e0; }
  337. #chat-wrapper h4 {
  338. font-family: 'Cherry Swash';
  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. font-family: 'Cherry Swash';
  456. width: 270px;
  457. height: 3em;
  458. line-height: 3em;
  459. font-size: 1.225rem;
  460. color: #423443;
  461. float: left;
  462. text-align: center; }
  463. #moves thead th, #moves thead tr {
  464. width: 100%;
  465. text-align: center;
  466. float: left; }
  467. #moves tbody tr {
  468. width: 270px;
  469. float: left; }
  470. #moves tbody tr td {
  471. width: 105px;
  472. text-align: left;
  473. line-height: 20px;
  474. margin: 0 15px;
  475. float: left; }
  476. #board_wrapper {
  477. float: left; }
  478. .chess_board {
  479. border: 8px solid #5e4a60;
  480. border-radius: 2px;
  481. width: 500px;
  482. height: 500px;
  483. float: left; }
  484. .chess_board tr {
  485. width: 500px;
  486. height: 62.5px;
  487. float: left;
  488. display: block; }
  489. .chess_board tr td {
  490. width: 62.5px;
  491. height: 62.5px;
  492. line-height: 62.5px;
  493. text-align: center;
  494. background: #fefefe;
  495. display: block;
  496. float: left; }
  497. .chess_board tr td a {
  498. width: 62.5px;
  499. height: 62.5px;
  500. font-size: 3.5rem;
  501. color: #424242;
  502. text-decoration: none;
  503. display: block; }
  504. .chess_board tr:nth-child(odd) td:nth-child(even),
  505. .chess_board tr:nth-child(even) td:nth-child(odd) {
  506. background: #dad7d2; }
  507. span.feedback {
  508. color: #424242;
  509. line-height: 28px;
  510. text-indent: 28px;
  511. margin-top: 1em;
  512. display: block;
  513. clear: left;
  514. float: left; }
  515. .feedback-status {
  516. font-weight: bold; }
  517. span.whitefeedback {
  518. background: url("../images/whiteking.png") 0% 50% no-repeat; }
  519. span.blackfeedback {
  520. background: url("../images/blackking.png") 0% 50% no-repeat; }
  521. span.promotion {
  522. line-height: 28px;
  523. text-indent: 28px;
  524. margin-top: 1em;
  525. display: block;
  526. float: right; }
  527. .chess_board td.selected {
  528. background: #ef9e9c !important; }
  529. /* Media queries */
  530. @media only screen and (min-width: 760px) and (max-width: 900px) {
  531. header, #board_moves_wrapper {
  532. max-width: 760px; }
  533. #sounds_label {
  534. max-width: 530px; }
  535. #container_wrapper {
  536. max-width: 900px;
  537. padding: 1em 10px; }
  538. table#moves {
  539. margin-left: 0;
  540. float: right;
  541. height: 516px; }
  542. table#moves, #moves thead, #moves tbody tr {
  543. width: 200px; }
  544. #moves tbody tr td {
  545. width: 90px;
  546. margin: 0 5px; } }
  547. @media only screen and (min-width: 1400px) {
  548. #chat-wrapper {
  549. display: block; } }
  550. @media only screen and (max-width: 999px) {
  551. #captured-pieces {
  552. display: none; } }
  553. @media only screen and (min-width: 530px) and (max-width: 759px) {
  554. header, #board_moves_wrapper, #sounds_label {
  555. max-width: 530px; } }
  556. @media only screen and (max-width: 759px) {
  557. html {
  558. font-size: 14px; }
  559. #form fieldset {
  560. width: 100%;
  561. text-align: center; }
  562. #form fieldset label {
  563. display: block;
  564. line-height: 45px;
  565. padding-left: 0; }
  566. #form fieldset label:before {
  567. margin-left: -7em;
  568. margin-top: 0;
  569. right: auto; }
  570. span#game-type {
  571. display: none; }
  572. #container_wrapper {
  573. max-width: 759px;
  574. padding: 1em 5px; }
  575. span.feedback {
  576. float: right;
  577. clear: none; }
  578. table#moves {
  579. margin-left: 0;
  580. margin-top: 0.5em;
  581. height: 258px; } }
  582. @media only screen and (max-width: 529px) {
  583. header, #board_moves_wrapper, #sounds_label {
  584. max-width: 470px; }
  585. input.game_link {
  586. font-size: 1rem; }
  587. ul#clock {
  588. width: 118px; }
  589. ul#clock li {
  590. width: 55px; }
  591. #container_wrapper {
  592. max-width: 529px;
  593. padding: 1em 5px; }
  594. .chess_board {
  595. border: 4px solid #5e4a60;
  596. width: 456px;
  597. height: 456px; }
  598. .chess_board tr {
  599. width: 456px;
  600. height: 57px; }
  601. .chess_board tr td {
  602. width: 57px;
  603. height: 57px;
  604. line-height: 57px; }
  605. .chess_board tr td a {
  606. width: 57px;
  607. height: 57px;
  608. font-size: 3.5rem; } }