.page{
    display:flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    font-family: Montserrat;
    color:var(--cloudy-white);
}

.qp-wrapper{
    display: flex;
    flex-direction: column;
    gap:20px;
    background-color: var(--graphite);
    padding:0 50px;
    width: clamp(20rem, 90%, 1500px);
    border:1.5px solid var(--slate-steel);
    border-top: none;
}

.qp-wrapper h1{
    margin-top:20px;
    font-size:22px;
    font-weight: 500;
}

.qp-wrapper h1 svg{
    height: 17px;
    width: auto;
}

.quick-play-logo-wrapper{
    display: flex;
    gap:32px;
    border-bottom: 2px solid var(--translucid-light);
    padding:32px 0;
    position: relative;
}

.quick-play-logo-wrapper *{
    z-index: 1;
  }
  
  .quick-play-logo-wrapper::before{
    content:'';
    display: block;
    height: 100%;
    width: calc(100% + 100px); /* Dodajemy 50px z lewej i 50px z prawej */
    margin-left: -50px; /* Przesuwamy o 50px w lewo, żeby wyrównać */
    background-color: #202327;
    position: absolute;
    z-index: 0;
    top:0;
  }


.quick-play-logo-wrapper img{
    width: 360px;
}

.lines{
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-content: space-between;
}

.line{
    height: 3px;
    border-radius: 5px;
    background: linear-gradient(45deg, rgba(34,197,94,.75) 0%, rgba(22, 135, 163, 0.6) 35%, rgba(55, 66, 58, 0) 100%);
    margin:7px 0;
}

.line:nth-child(1){
    width: 100%;
}

.line:nth-child(2){
    width: 95%;
}

.line:nth-child(3){
    width: 90%;
}

.qp-container{
    display: flex;
    flex-direction: column;
    gap:10px;
    border-bottom: 1px solid var(--translucid-light);
    padding-bottom: 32px;
}

.qp-container h2{
    font-weight: 400;
    margin:0;
    font-size:20px;
}

.qp-container p{
    margin:5px 0;
}

#please-note{
    color: var(--azure-blue);
    background: var(--translucid-dark);
    padding: 16px;
    border: 1.5px solid #35373b;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap:10px;
    font-weight: 500;
}

#please-note svg{
    width: 32px;
    height: auto;
}

#please-note span{
    display: flex;
}

#please-note p {
    margin:0;
}

.qp-name input{
    border-radius: 6px;
    outline:1.5px solid #35373b;
    padding:12px 20px;
    background-color: var(--translucid-dark);
    border:none;
    color:var(--cloudy-white);
    transition:outline 125ms ease-in-out;
    font-size:16px;
    width: 400px;
    font-family: Montserrat;
}

/* Change the white to any color */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px #23262b inset !important;
}

.qp-name input:hover:not(:disabled,:focus){
    outline:1.5px solid var(--main-green);
}

.qp-name input:focus{
    outline:2.5px solid var(--main-green-hover);
}


.qp-name input:disabled{
    background-color: #1b1d20;
    color:grey;
    pointer-events: none;
}

.lock{
    height: 16px;
    top:13px;
    left:410px;
    position: absolute;
    filter:brightness(.5);
}

.tournament-name-input, .hosted-by-input{
    display: flex;
    flex-direction: column;
    gap:5px;
    position: relative;
}

.tourney-name-errors, .hosted-by-errors{
    margin-left:5px;
    margin-top:4px;
}

.tourney-name-errors span, .hosted-by-errors span{
    display: none;
    color:var(--crimson-red);
}

.qp-form{
    display: flex;
    flex-direction: column;
    gap:20px;
}

.formulas-container{
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap:40px;
    padding:20px 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.formula{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap:20px;
    box-sizing: border-box;
    padding:20px;
    background-color:var(--translucid-dark);
    outline:1px solid var(--translucid-light);
    border-radius: 10px;
    width: 250px;
    height: 250px;
    transition: all 350ms cubic-bezier(0.23, 1, 0.320, 1);
    flex-shrink: 0;
}

.formulas-container input[type="radio"]{
    display: none;
}

.formulas-container input[type="radio"]:checked + label {
    outline:none;
    background: linear-gradient(45deg, rgba(34,197,94, 1) 20%, rgba(22, 135, 163, 1) 100%);
    transform: translateY(-10px);
    box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}

.formulas-container input[type="radio"]:checked + label h2{
    font-weight: 700;
}

.greyed-out{
    opacity:.5;
    filter:grayscale(.75);
}

.formula:not(.greyed-out):hover{
    outline:1px solid var(--main-green);
    cursor: var(--custom-pointer);
}

.formula h2{
    margin:0;
    font-weight: 500;
    color:#d6d6d6;
    font-size:clamp(12px, 3vw, 24px);
    text-align: center;
}

.formula img{
    filter: drop-shadow(0px 3px 5px rgb(46, 46, 46));
    height: 70%;
    width: 90%;
}

.qp-players textarea{
    width: 600px;
    height: 100px;
    border-radius: 8px;
    resize: none;
    color:var(--cloudy-white);
    border-radius: 6px;
    outline:1.5px solid #35373b;
    background-color: var(--translucid-dark);
    padding:16px;
    font-family: Montserrat;
    font-size:16px;
    transition:outline 100ms;
    border:none;
}

.qp-players textarea:hover{
    outline:1px solid var(--main-green);
}

.qp-players textarea:focus{
    outline:2.5px solid var(--main-green-hover);
}

.qp-start{
    display: flex;
    justify-content: flex-end;
    padding:24px 0 40px 0;
    position: relative;
}

.qp-start *{
    z-index: 1;
  }
  
  .qp-start::before{
    content:'';
    display: block;
    height: 117%;
    width: calc(100% + 100px); /* Dodajemy 50px z lewej i 50px z prawej */
    margin-left: -50px; /* Przesuwamy o 50px w lewo, żeby wyrównać */
    background-color: #202327;
    position: absolute;
    z-index: 0;
    left:0;
    bottom:0;
  }

.qp-start button{
    display: flex;
    justify-content: center;
    align-items: center;
    gap:8px;
    background: linear-gradient(45deg, rgba(34,197,94, 1) 30%, rgba(22, 135, 163, 1) 100%);
    color:var(--cloudy-white);
    font-family: Montserrat;
    border:none;
    padding:14px 28px;
    border-radius: 32px;
    font-size:18px;
    cursor: var(--custom-pointer);
    transition: all 150ms ease-in-out;
}

.qp-start button:disabled{
    filter:brightness(.5);
    cursor:not-allowed;
}

.qp-start button:hover:not(:disabled){
    transform: translateY(-3px);
    box-shadow: 0px 5px 5px 0px rgba(23, 201, 23, 0.24);
}

.qp-start button:active:not(:disabled){
    transform:scale(.98);
}


.qp-start button svg{
    height: 20px;
    width: auto;
}

input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0; 
}


.first-to-wrapper{
    display: none;
    gap:8px;
    align-items: center;
    position: relative;
}

.extra-options-wrapper{
    display: flex;
    align-items: center;
    height: 20px;
}

.first-to-wrapper input{
    border-radius: 6px;
    outline:1.5px solid #35373b;
    padding:8px 8px;
    background-color: var(--translucid-dark);
    border:none;
    color:var(--cloudy-white);
    transition:outline 125ms ease-in-out;
    font-size:16px;
    width: 64px;
    font-family: Montserrat;
    text-align: center;
}

.first-to-wrapper input:hover{
    outline:1.5px solid var(--main-green);
}

.first-to-wrapper input:focus{
    outline:2.5px solid var(--main-green-hover);
}




.checkbox-wrapper-35 .switch {
    display: none;
  }
  
  .checkbox-wrapper-35 .switch + label {
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    color: #9c9c9c;
    cursor: var(--custom-pointer);
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    font-size: 16px;
    line-height: 15px;
    font-weight: 500;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    width: 260px;
  }
  
  .checkbox-wrapper-35 .switch + label::before,
    .checkbox-wrapper-35 .switch + label::after {
    content: '';
    display: block;
  }
  
  .checkbox-wrapper-35 .switch + label::before {
    background-color: #34353d;
    border-radius: 500px;
    height: 20px;
    margin-right: 8px;
    -webkit-transition: background-color 0.125s ease-out;
    transition: background-color 0.125s ease-out;
    width: 36px;
  }
  
  .checkbox-wrapper-35 .switch + label::after {
    background-color: #fff;
    border-radius: 13px;
    box-shadow: 0 3px 1px 0 rgba(37, 34, 71, 0.05), 0 2px 2px 0 rgba(37, 34, 71, 0.1), 0 3px 3px 0 rgba(37, 34, 71, 0.05);
    height: 19px;
    left: 1px;
    position: absolute;
    -webkit-transition: -webkit-transform 0.125s ease-out;
    transition: -webkit-transform 0.125s ease-out;
    transition: transform 0.125s ease-out;
    transition: transform 0.125s ease-out, -webkit-transform 0.125s ease-out;
    width: 19px;
  }
  
  .checkbox-wrapper-35 .switch + label .switch-x-text {
    display: block;
    margin-right: .3em;
  }
  
  .checkbox-wrapper-35 .switch + label .switch-x-toggletext {
    display: block;
    font-weight: bold;
    height: 15px;
    overflow: hidden;
    position: relative;
    width: 32px;
  }
  
  .checkbox-wrapper-35 .switch + label .switch-x-unchecked,
    .checkbox-wrapper-35 .switch + label .switch-x-checked {
    left: 0;
    position: absolute;
    top: 0;
    -webkit-transition: opacity 0.125s ease-out, -webkit-transform 0.125s ease-out;
    transition: opacity 0.125s ease-out, -webkit-transform 0.125s ease-out;
    transition: transform 0.125s ease-out, opacity 0.125s ease-out;
    transition: transform 0.125s ease-out, opacity 0.125s ease-out, -webkit-transform 0.125s ease-out;
  }
  
  .checkbox-wrapper-35 .switch + label .switch-x-unchecked {
    opacity: 1;
    -webkit-transform: none;
    transform: none;
  }
  
  .checkbox-wrapper-35 .switch + label .switch-x-checked {
    opacity: 0;
    -webkit-transform: translate3d(0, 100%, 0);
    transform: translate3d(0, 100%, 0);
  }
  
  .checkbox-wrapper-35 .switch + label .switch-x-hiddenlabel {
    position: absolute;
    visibility: hidden;
  }
  
  .checkbox-wrapper-35 .switch:checked + label::before {
    background-color: var(--main-green);
  }
  
  .checkbox-wrapper-35 .switch:checked + label::after {
    -webkit-transform: translate3d(16px, 0, 0);
    transform: translate3d(16px, 0, 0);
  }
  
  .checkbox-wrapper-35 .switch:checked + label .switch-x-unchecked {
    opacity: 0;
    -webkit-transform: translate3d(0, -100%, 0);
    transform: translate3d(0, -100%, 0);
  }
  
  .checkbox-wrapper-35 .switch:checked + label .switch-x-checked {
    opacity: 1;
    -webkit-transform: none;
    transform: none;
  }

  .flag{
    position: absolute;
    top:8px;
    left:450px;
    opacity: 0;
    transition: all 350ms ease-in-out;
    transform-origin: 5px 25px;
    display: flex;
  }

  .textarea-flag{
    left:650px;
  }

  .first-to-flag{
    left:200px;
    top:4px;
  }

  .flag-shown{
    opacity:1;
    animation: wobblyFlag 1500ms cubic-bezier(0.5, 0, 0.5, 1) infinite;
}


  @keyframes wobblyFlag {
    0%{
        transform: rotate(-10deg);
    }
    50%{
        transform: rotate(5deg);
    }
    100%{
        transform: rotate(-10deg);
    }
  }



  .lds-ring {
    display:none;
    width: 24px;
    height: 24px;
 }
 
 .lds-ring div {
     box-sizing: border-box;
     display: block;
     position: absolute;
     width: 24px;
     height: 24px;
     margin: 0px;
 
     border: 3px solid #dfdfdf;
     border-radius: 50%;
     
     animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
     border-color: var(--cloudy-white) transparent transparent transparent;
 }
 
 .lds-ring div:nth-child(1) {
     animation-delay: -0.45s;
 }
 
 .lds-ring div:nth-child(2) {
     animation-delay: -0.3s;
 }
 
 .lds-ring div:nth-child(3) {
     animation-delay: -0.15s;
 }
 
 @keyframes lds-ring {
     0% {
         transform: rotate(0deg);
     }
 
     100% {
         transform: rotate(360deg);
     }
 }


 .your-quick-plays-wrapper{
    display: flex;
    align-items: center;
    gap:24px;
    overflow-x: auto;
    padding: 8px 20px 16px 20px;
 }

 .quick-play-tile{
    padding:16px;
    background-color: var(--translucid-dark);
    border:1.5px solid #22504e;
    min-width: 200px;
    height: 100px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    gap:5px;
    transition: all 250ms cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    background-image: url('../users/img/tourney_img/quick-play.svg');
    background-size: auto;
    background-repeat: no-repeat;
    background-position:12% -15%;
    background-color: #1a1a1a;
 }

 .quick-play-tile:hover{
    transform: translateY(-5px);
    border-color: #238b75;
 }

 .qp-logo{
    height: auto;
    width: 10px;
    position: absolute;
    right:10px;
    top:10px;
 }

 .qp-tile-info{
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap:5px;
    overflow: hidden;
 }

 .qp-tile-name{
    font-size:16px;
    font-weight: 600;
    border-bottom: 1.5px solid #35373b;
    padding-bottom: 5px;
    text-decoration: none;
    color:var(--cloudy-white);
 }

 .qp-tile-formula{
    font-size:12px
 }

 .qp-bottom{
    display: flex;
    justify-content:space-between;
    align-items: center;
    gap:4px;
 }

 .qp-bottom svg{
    height: auto;
    width: 16px;
 }

 .qp-actions{
    display: flex;
    gap:8px;
    align-items: center;
 }

 .qp-actions svg{
    opacity:.4;
    transition: all 100ms ease-in-out;
 }

 .quick-play-tile:hover .qp-actions svg{
    opacity:1;
 }

 .qp-actions a{
    display: flex;
    transition: 100ms ease-in-out;
 }

 .qp-actions a:hover{
    transform:scale(1.1);
 }

 .qp-time{
    display: flex;
    align-items: center;
    gap:5px;
 }

 @media only screen and (max-width: 764px){
    .qp-wrapper h1{
        font-size: 18px;
    }

    .qp-header p{
        font-size:14px;
    }
}

@media only screen and (max-width: 660px){
    .lines{
        display: none;
    }
    .quick-play-logo-wrapper{
        justify-content: center;
    }

    .quick-play-logo-wrapper img{
        width: 80%;
    }

    .quick-play-logo-wrapper{
        padding-bottom: 16px;
    }
    .qp-name input, .qp-players textarea{
        width: 100%;
        box-sizing: border-box;
    }
    .formula{
        width: 200px;
        height: 200px;
    }
}

@media only screen and (max-width: 510px){
    .formula{
        width: 150px;
        height: 150px;
    }
    .formulas-container{
        gap:20px;
    }
    .qp-container h2{
        font-size: 20px;
    }
    .qp-start button{
        font-size:14px;
        padding:10px 20px;
    }
    .qp-start button svg{
        height: 14px;
    }
}