style.css 4.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. @keyframes headerbg {0%{background-position: 0% 50%;}50%{background-position: 100% 50%;}100%{background-position: 0% 50%;}}
  2. *{box-sizing: border-box;font-family: sans-serif;scrollbar-color: #7068DB transparent;scrollbar-width:thin;}
  3. ::-webkit-scrollbar {width: 5px;}
  4. ::-webkit-scrollbar-track {background: transparent;}
  5. ::-webkit-scrollbar-thumb {background: #7068DB;}
  6. html, body{text-align:center;font-family: sans-serif;margin:0;padding:0;}
  7. a{text-decoration:none;color: #4E46BB;font-size:1rem;padding:2pt;}
  8. ol{list-style-type: circle;list-style-image: url('list.gif');}
  9. li:first-letter{text-transform: capitalize;}
  10. body{background:#E1DDEA;color:#454065;}
  11. .wrap {display: grid;grid-template-areas: "header" "main" "footer";gap: 10pt;
  12. justify-items:center;min-height:100vh;}
  13. .wrap2 {display: grid; grid-template-columns: repeat(3,1fr);grid-template-rows: 0.1fr;grid-template-areas: "languages1 button1 languages2" "input button2 input2" "audio1 . audio2" "definit . transl";}
  14. header {grid-area: header;background: linear-gradient(45deg, #A58AE3, #BB6BC6, #7068DB, #BB6BC6);background-size: 400% 400%;width:100%;height:50pt;padding:5pt;display: flex;align-items: center;justify-content: space-between;animation:headerbg 10s ease infinite;border-bottom:1px solid rgba(255,255,255,0.5);}
  15. header h1 {font-size:2rem;color:white;text-shadow: 2px 0px 4px rgba(0,0,0,0.1);}
  16. footer {font-size:0.80rem;padding:5pt;margin-top:10pt;grid-area:footer;width:100%;}
  17. footer ul > li {display:inline;}
  18. #translation-form {grid-area: main;margin-top:2vh;width:90vw;}
  19. #could_not_switch_languages_text {color:red;}
  20. .audio-player {margin-top:10pt;}
  21. audio {filter: invert(1) contrast(1) saturate(1) grayscale(1);width: 50%;height: 30pt;border-radius: 50pt;}
  22. audio::-webkit-media-controls-enclosure {filter: invert(1);}
  23. .language {margin:0 28pt;}
  24. .switch_languages {grid-area:button1;}
  25. input, select,textarea,button {border-radius: 5pt;border: none;font-size: 1rem; }
  26. button {padding: 4px 10px;
  27. background: linear-gradient(145deg, #A58AE3,#7068DB);cursor:pointer;transition:ease-out 0.095s;box-shadow: -20px 20px 40px rgba(0,0,0,0.05),20px -20px 40px rgba(255,255,255,0.1);color:white;}
  28. button:hover {transform:scale(1.1);}
  29. #prefs button {padding:15pt;font-size:1.5rem;}
  30. #translate-button {height: 50pt;margin: 50% auto;grid-area: button2;width: 50pt;border-radius: 50pt;}
  31. #to_language, #from_language,textarea {resize:none;font-size:1.5rem;padding:5pt;background:linear-gradient(225deg, #fff, #f0f0f0);}
  32. #to_language:focus, #from_language:focus, textarea:focus{border-color: #A58AE3;outline: 1px solid #A58AE3;}
  33. input,select,textarea {padding: 4px;}
  34. select {font-size:1.8rem;}
  35. textarea {margin-top:15pt;overflow-y:scroll;height:200pt;width:40vw;}
  36. select, textarea {box-shadow: -20px 20px 40px rgba(0,0,0,0.05),20px -20px 40px rgba(255,255,255,0.1);color:#454065;}
  37. select,textarea,button{border:1px solid rgba(255,255,255,0.1);}
  38. .translations {grid-area: transl;}
  39. .definitions {grid-area: definit;}
  40. .definitions, .translations{margin-top: 15pt;margin-bottom:15pt;}
  41. .definitions input, .translations input {display:none;}
  42. .definitions label, .translations label {display:none;}
  43. .def-content, .trans-content {display:block;text-align:left;}
  44. .syn_type,.def_type {color: #4E46BB;text-transform: capitalize;}
  45. .def-content .syn{display:block;}
  46. .syn {color: #BB6BC6;}
  47. .use_in_sentence {color: #AF2FD0;display:block;}
  48. .use_in_sentence:first-letter {text-transform: capitalize;}
  49. .definitions li:not(:last-child) {margin-bottom: 1rem;}
  50. #prefs {font-size:1.4rem;display:grid;justify-items:center;gap:10pt;}
  51. #prefs input[type="checkbox"]{width:30pt;height:30pt;}
  52. @media screen and (max-width: 820px) {
  53. header {height:100%;}
  54. textarea {width: 90vw;margin-top:10pt} select{font-size:2.4rem;width:90vw;}
  55. #switchbutton {height: 50pt;width: 100pt;margin-top: 20pt;}
  56. #translate-button {width:100pt;height:100pt;margin:10pt 15pt 30pt 15pt;}.language{margin:0;}
  57. .wrap2 { grid-template-areas:"languages1" "input" "audio1" "definit" "button2" "languages2" "input2" "audio2" "transl" "button1";justify-items:center;width: 100vw;margin: 0; grid-template-rows: auto;}
  58. footer {font-size:0.90rem;padding:5pt;}
  59. .def-content, .trans-content {display:none;}
  60. .definitions input, .translations input {display:none;}
  61. .definitions label, .translations label {display:block;padding:15pt;margin:10pt auto 5pt auto;background: linear-gradient(145deg, #A58AE3,#7068DB);color:white;border-radius:5px;border:1px solid rgba(255,255,255,0.1);box-shadow:-15px 15px 20px rgba(0,0,0,0.1),15px -15px 20px rgba(255,255,255,0.1);cursor:pointer;transition:ease-out 0.095s;width:200pt;font-size:1.5rem;}
  62. .definitions label:hover,.translations label:hover {transform:scale(1.1);}
  63. .definitions input[type="checkbox"]:checked ~ .def-content, .translations input[type="checkbox"]:checked ~ .trans-content{display:block;font-size:2rem;}
  64. .def_type,.syn_type{display:none;}
  65. svg {transform:scale(1.5);}header svg{transform:scale(1.2);}footer ul > li {display:block;list-style:none;margin-right:25pt;margin-bottom:10pt;}
  66. }