* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
  --grey: #A7A3C2;
  --grey-light: #D5CEEA;
  --grey-lighter: #F8F5FF;
  --black: #2A2C40;
  --main :#6116FF ;

  --btnColor: #6116FF;
  --btnBorder: #24008C;
  --bg: #FFFFFF;            /* Dark/Light Mode : */
  --btnBg: #F8F5FF;         /* These custom properties are the colors that change */
  --formText: #000000;      /* when we switch from one mode to another */
  --headerColor : #161827;  /* we binded some JS to them to facilitate the switch */
}

body {
    font-family: 'Epilogue', sans-serif;
}

/* Button */
.py-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 12px;
    margin: 0;
    margin-bottom: 16px;
    text-decoration: none;
    background: var(--btnColor);
    color: #fff;
    font-family: 'Epilogue', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-align: center;
    transition: all 150ms ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
}

.py-button circle {
    transition: transform 150ms ease;
}

.py-button > span {
    transition: transform 300ms ease;
    display: inline-block;
}

.py-button:hover {
    box-shadow: 0px -4px 0px 0px var(--btnBorder) inset;
    -webkit-box-shadow: 0px -4px 0px 0px var(--btnBorder) inset;
    -moz-box-shadow: 0px -4px 0px 0px var(--btnBorder) inset;
}

.py-button:hover circle {
    transform: translateX(5px);
}

.py-button:hover > span {
    transform: translateX(-5px);
}

.py-dice {
    font-size: 32px;
    position: absolute;
    right: 0;
    transform: translateX(100%);
    padding: 0 10px;
    transition: transform 600ms ease-out;
}

.py-dice:hover div {
    animation: diceShaking 150ms infinite alternate linear;
}

.py-button:hover .py-dice {
    transform: translate(50%);
}

.py-dice:hover {
    transform: translateX(0%) !important;
}

.py-button-icon {
    margin-right: 12px;
}

.py-secondary-button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 50%;
    transition: all 150ms ease;
    cursor: pointer;
}

.py-secondary-button:hover {
    background-color: var(--btnBg);
}

.py-secondary-button svg * { transition: all 150ms; }
.py-secondary-button:hover svg * {
    fill: var(--main);
}

.py-container {
    position: relative;
    width: 400px;
    height: 630px; /* had to fix the height because object height auto not working */
    border: none;
    background-color: var(--bg);
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    padding: 24px 24px 16px;
    transition : background-color 250ms;
}

.reset-button {
    position: absolute;
    top: 24px;
    right: 24px;
}

.darkmode-button {
    position: absolute;
    top: 24px;
    left: 24px;
}

.py-header {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 24px;
}

.py-header-eyes {
    width: 32px;
    margin-right: 8px;
}

.py-header-eyes circle {
    transition: all 150ms ease;
}

.py-header-eyes:hover circle  {
    transform: translateX(5px);
}

.py-header-title {
    font-size: 24px;
    color: var(--headerColor);
    font-weight: 900;
}

.py-footer {
    text-align: center;
    font-size: 11px;
    color: var(--grey);
}

.py-footer a {
    color: var(--headerColor);
}

input {
    -webkit-appearance: none;
    -moz-appearance: none;
}

.py-form-group {
    display: block;
    position: relative;
    width: 100%;
    margin-bottom: 24px;
}

.py-form-group.c-thumb {
    flex-basis: 56px;
    margin-right: 24px;
    margin-bottom: 16px;
}

.py-form-label {
    position: absolute;
    top: calc(50% - 7.5px);
    transition: all 0.15s ease-in;
    pointer-events: none;
    font-size: 15px;
    color: var(--grey);
}

.py-form-field {
    background: transparent;
    display: block;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--grey-light);
    font-size: 15px;
    height: 40px;
    outline: 0;
    color: var(--formText);
    transition: color 250ms;
}

.py-form-field:focus {
    border-color: var(--main);
}

.py-form-field:focus + .py-form-label,
.py-form-field:valid + .py-form-label {
    top: -6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--main);
}

.py-form-file {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.py-error {
    display: block;
    margin-top: 12px;
}

/* Channel file */
.file-channel-thumbnail + .py-form-filelabel {
    display: block;
    width: 56px;
    height: 56px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border-radius: 50%;
    transition: all 250ms;
    background-color: var(--btnBg);
}

.file-channel-thumbnail:focus + .py-form-filelabel,
.file-channel-thumbnail + .py-form-filelabel:hover {
    background-color: var(--grey-light);
}

.preview-channel-thumbnail {
    max-width: 56px;
}

.channel-fileinput-img {
    position: relative;
    z-index: 10;
    display: none;
    top: 50%;
    transform: translateY(-50%);
}

.file-channel-thumbnail:valid + .py-form-filelabel .channel-fileinput-img,
.file-channel-thumbnail.loaded + .py-form-filelabel .channel-fileinput-img{
    display: block;
}

.channel-fileinput-user {
    position: absolute;
    left: 50%;
    bottom: -2px;
    transition: all 250ms;
    transform-origin: 50% 150%;
    opacity: 1;
    transform: translateX(-50%);
}

.file-channel-thumbnail + .py-form-filelabel:hover .channel-fileinput-user {
    transform: rotate(-90deg);
    opacity: 0;
}

.channel-fileinput-add {
    position: absolute;
    width: 18px;
    left: 19px;
    top: 19px;
    transition: all 250ms;
    transform-origin: 50% 200%;
    transform: rotate(90deg);
}

.file-channel-thumbnail + .py-form-filelabel:hover .channel-fileinput-add {
    transform: rotate(0deg);
}

.file-channel-thumbnail:valid + .py-form-filelabel .channel-fileinput-user,
.file-channel-thumbnail:valid + .py-form-filelabel .channel-fileinput-add,
.file-channel-thumbnail.loaded + .py-form-filelabel .channel-fileinput-user,
.file-channel-thumbnail.loaded + .py-form-filelabel .channel-fileinput-add{
    display: none;
}

/* Video thumbnail file */
.file-video-thumbnail + .py-form-filelabel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 200px;
    background-color: var(--btnBg);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: background-color 350ms;
}

.file-video-thumbnail:focus + .py-form-filelabel,
.file-video-thumbnail + .py-form-filelabel:hover {

}

.video-fileinput-img {
    position: absolute;
    z-index: 6;
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 6px solid var(--btnBg);
}

.file-video-thumbnail:valid + .py-form-filelabel .video-fileinput-img,
.file-video-thumbnail.loaded + .py-form-filelabel .video-fileinput-img {
    display: block;
}

.file-video-dragarea {
    position: absolute;
    display: block;
    pointer-events: none;
    top: 2px;
    right: 2px;
    bottom: 2px;
    left: 2px;
    border-radius: 4px;
    border: 1px dashed var(--grey-light);
    transition: ease 250ms;
    z-index: 5;
}

.file-video-thumbnail + .py-form-filelabel:hover .file-video-dragarea {
    border-color: var(--main);
}

.file-video-text {
    font-size: 13px;
    color: var(--grey);
    display: inline-block;
    font-weight: 600;
    transition: ease 250ms;
    opacity: 1;
}

.file-video-thumbnail + .py-form-filelabel:hover .file-video-text {
    opacity: 0;
}

.file-video-illu {
    width: 68px;
    margin-bottom: 24px;
    transition: ease 250ms;
}

.file-video-thumbnail + .py-form-filelabel:hover .file-video-illu {
    transform: scale(1.3) rotate(-5deg);
    transform-origin: 50% 50%;
}

.file-video-catpaw {
    transform: rotate(-45deg);
    position: absolute;
    right: -40%;
    bottom: -100%;
    transition: ease 250ms;
    pointer-events: none;
    opacity: 0;
}

.file-video-thumbnail + .py-form-filelabel:hover .file-video-catpaw {
    right: 0px;
    bottom: -45%;
    opacity: 1;
}

/* Random position */
.random-switch {display: flex; margin-bottom: 18px;}
.random-switch.active .py-form-label {color: var(--formText);}

.switch {
    display: inline-block;
    margin-left: auto;
    width: 40px;
    height: 24px;
}

.slider {
    position: relative;
    cursor: pointer;
    width: 100%;
    height: 100%;
    display: block;
    background-color: #7D7A90;
    transition: .4s;
    border-radius: 34px;
}
  
.slider:before {
    position: absolute;
    content: '';
    border-radius: 50%;
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}
  
input:checked + .slider {background-color: var(--btnColor);}
input:focus + .slider {box-shadow: 0 0 1px var(--btnColor);}
input:checked + .slider:before {transform: translateX(16px);}

/* //////// */

.row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.row .py-form-group {
    margin-bottom: 0;
}


@keyframes diceShaking {
    0% {
        transform: rotate(8deg);
    }

    100% {
        transform: rotate(-8deg);
    }
}
