@import "../colors.less"; :root { --qr-code-dark: @copy; --qr-code-light: @secondary-light; } body { margin: auto; font-family: system-ui, sans-serif; background: @foreground; color: @error; height: 100vh; .header { background: @background; div { margin: auto; padding: 20px; text-align: center; h1 { margin: 0; padding: 20px; text-align: center; color: @primary-content; background-color: @primary-light; border-radius: 20px; } } } .input { padding: 20px; div { background: @primary; padding: 20px; border-radius: 10px; h3 { text-align: center; margin: 0; padding: 0; color: @primary-content; font-weight: bold; } } input, button { box-sizing: border-box; width: 100%; padding: 15px; margin-top: 12px; font-size: 16px; border-radius: 10px; border: none; } input { outline: none; &.error { animation: shake 0.2s ease-in-out 0s 2; box-shadow: 0 0 4px @error; } } button { background: @secondary; color: @secondary-content; font-weight: bold; } } .main { .controll { padding: 10px; text-align: center; button { border: none; border-radius: 10px; padding: 10px 16px; margin: 0 20px; font-size: .9rem; font-weight: 600; cursor: pointer; color: @secondary-content; background: @secondary; transition: background .2s ease, transform .1s ease, box-shadow .1s ease; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); &:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); } &:active { transform: translateY(0); box-shadow: 0 3px 8px rgba(0, 0, 0, .2); } } } .players { padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; .card { background: @primary; color: @primary-content; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .15); transition: transform .2s ease, box-shadow .2s ease; cursor: default; &:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); } p { margin: 0; padding: 0; } .name { font-size: 1.1rem; font-weight: 700; } .nickname { font-size: .9rem; opacity: .85; } .code { text-align: center; border-radius: 6px; padding: 4px 8px; display: inline-block; } .idee { font-size: .75rem; opacity: .6; } /* QR Code Container */ div[title] { margin: 12px auto 0; padding: 10px; background: var(--qr-code-light); border-radius: 12px; width: fit-content; img { display: block; width: 120px; height: 120px; } } .remove-btn { margin-top: auto; border: none; background: @error; color: @error-content; border-radius: 8px; padding: 6px 10px; font-size: .8rem; cursor: pointer; transition: background .2s ease; &:hover { background: rgba(255, 0, 0, .25); } } &.guessed { background-color: @success; } } } .spacer { height: 70px; color: @foreground; } } .footer { position: fixed; bottom: 0; left: 0; right: 0; display: flex; gap: 10px; padding: 10px; background-color: @background; .footer-btn { flex: 1; padding: 15px; font-size: 16px; border: none; border-radius: 10px; background: @secondary; color: @secondary-content; font-weight: bold; &:active { transform: scale(0.95); } } } /* The Modal (background) */ .modal { display: none; position: fixed; z-index: 1; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: fade(@background, 90%); padding-top: 50px; /* The Modal Close Button (x) */ .close { position: absolute; right: 35px; top: 15px; font-size: 40px; font-weight: bold; color: @secondary-content; } .close:hover, .close:focus { color: @secondary; cursor: pointer; } /* Modal Content/Box */ .modal-content { background-color: @primary; margin: 5% auto 15% auto; /* 5% from the top, 15% from the bottom and centered */ border: 1px solid @border; border-radius: 10px; width: 80%; color: @primary-content; /* Could be more or less, depending on screen size */ h1 { text-align: center; } /* Clear floats */ .clearfix { display: flex; &::after { content: ""; clear: both; display: table; } .button { flex: 1; width: 40%; padding: 10px; margin: 10px; background-color: @secondary; color: @secondary-content; border: 1px solid @border; border-radius: 5px; } } } } } @keyframes shake { 0% { margin-left: 0rem; } 25% { margin-left: 0.5rem; } 75% { margin-left: -0.5rem; } 100% { margin-left: 0rem; } } .hidden { display: none; } //when 3 cards in a row @media screen and (min-width: 992px) { .card:nth-of-type(3n+2) .card__expander { margin-left: calc(-100% - 30px); } .card:nth-of-type(3n+3) .card__expander { margin-left: calc(-200% - 60px); } .card:nth-of-type(3n+4) { clear: left; } .card__expander { width: calc(300% + 60px); } } //when 2 cards in a row @media screen and (min-width: 768px) and (max-width: 991px) { .card:nth-of-type(2n+2) .card__expander { margin-left: calc(-100% - 30px); } .card:nth-of-type(2n+3) { clear: left; } .card__expander { width: calc(200% + 30px); } }