style.css 14 KB

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