:root{
    --brand-color: #ebc800;
    --bgDark: #090C11;
    --bgLight:#11151c;
    --item: #788287;
}

*{
    margin:0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Play", serif;
}
input {outline:none;}
body{
    background-color: var(--bgLight);
    overflow: hidden;
    min-height: 100vh;
}
  
.snowflake {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--brand-color);
    border-radius: 50%;
}

header{
    background-color: var(--bgDark);
    padding:5px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
}
a{
    text-decoration: none;
}
.header_logo{
    display: flex;
    align-items: center;
    gap:5px;
}
.header_logo p{
    color: var(--brand-color);
    font-size: 40px;
    font-weight: bold;
}

.header_logo img{
    width: 40px;
}

.auth_page{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

#loginForm{
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

input{
    background-color: var(--bgDark);
    border: 1px solid var(--bgDark);
    text-align: center;
    font-size: 18px;
    border-radius: 5px;
    font-weight: bold;
    padding: 7px;
    color: #fff;
}
input::placeholder{
    color: var(--item);
}
input:focus{
    border: 1px solid var(--brand-color);
}

button{
    text-align: center;
    font-size: 18px;
    border-radius: 5px;
    font-weight: bold;
    padding: 7px 5px;
    cursor: pointer;
    color: var(--bgDark);
    border: none;
    background-color: var(--brand-color);
}
input:hover{
    border: 1px solid var(--brand-color);
}
button:hover{
    background-color: var(--brand-color);
}

.header_button{
    background-color: var(--bgLight);
    color: var(--item);
    font-size: 22px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

.header_button:hover{
    color: #fff;
}

#AuthError{
    color: #ff4545;
    position: absolute;
    left: 0;
    top: -30px;
}

.page_wrap{
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#auth_login.shake,
#auth_password.shake,
#CreateLinkForm-nickname.shake, 
#CreateLinkForm-steamid.shake,
#CreateLinkForm-avatarurl.shake{
    animation: shake 0.5s ease;
  }
  
@keyframes shake {
    0%, 100% {
      transform: translateX(0);
    }
    20% {
      transform: translateX(-5px);
    }
    40% {
      transform: translateX(5px);
    }
    60% {
      transform: translateX(-3px);
    }
    80% {
      transform: translateX(3px);
    }
}

#CreateLinkForm{
    display:flex;
    flex-direction: column;
    gap: 10px;
}
.CreateLinkModal-header{
    display: flex;
    justify-content: space-between;
}

.CreateLinkModal-header p{
    font-weight: bold;
    color: var(--item)
}

.create{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    position: relative;
    padding: 0 20px;
}

.CreateLinkFormDownloadBtn{
    text-align: center;
    font-size: 18px;
    border-radius: 5px;
    font-weight: bold;
    padding: 7px 0;
    cursor: pointer;
    width: 100%;
    display: block;
    color: #fff;
    border: none;
    background-color: #363636;
}
.CreateLinkFormDownloadBtn:hover{
    background-color: var(--brand-color);
}
.CreateLinkUrl a:hover{
    color: var(--brand-color);
}
.CreateLinkBtn{
    background-color: var(--bgDark);
    padding: 20px;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    color: var(--item);
    transition: 0.3s;
    font-size: 14px;
}
.CreateLinkBtn:hover{
    background-color: var(--bgDark);
    color: #fff;
    transform: scale(1.05);
}
.CreateLinkBtn img{
    max-width: 150px;
    width: 100%;
    filter: brightness(0) saturate(100%) invert(55%) sepia(9%) saturate(341%) hue-rotate(155deg) brightness(90%) contrast(88%);
}
.CreateLinkBtn:hover.CreateLinkBtn img{
    filter: initial;
}

.CreateLinks{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.CreateLinkFormSuccess{
    color: #21b24c;
    font-weight: bold;
}

.CreateLinkResult{
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.CreateLinkUrl{
    font-weight: bold;
    color: #fff;
}
.CreateLinkUrl a{
    color: gray;
}

@media(max-width:480px){
    .CreateLinks{
        gap: 20px;
    }
}

table{
    border: 1px solid var(--bgLight);
    background-color: var(--bgDark);
    border-collapse: collapse;
}
thead{
    display: block;
}
tr{
    display: grid;
    grid-template-columns: 50px 2fr 1fr 1fr;
}
tbody{
    display: block;
    max-height: 400px;
    overflow:auto;
}
tbody::-webkit-scrollbar {
    width: 2px;
  }
  
  tbody::-webkit-scrollbar-track {
    background: var(--bgDark);
  }
  
  tbody::-webkit-scrollbar-thumb {
    background-color: var(--brand-color);
    border-radius: 20px;
  }
tr th{
    color: var(--item);
    border: 1px solid var(--bgLight);
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
tr td{
    color: #fff;
    text-align: center;
    border: 1px solid var(--bgLight);
    padding: 5px;
    gap: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.users_page_wrap{
    display: grid;
    place-items: center;
    flex-grow: 1;
    padding: 0 10px;
}

.users_table{
    width: 100%;
    margin-top: 5px;
}

.users_table_wrap{
    max-width: 700px;
    width: 100%;
}
#create_user{
    display: flex;
    gap: 5px;
    margin-top: 10px;
}
#create_user input{
    width: 100%;
}
#create_user button{
    max-width: 140px;
    width: 100%;
}
.users_table_title{
    color: #fff;
}
.user_role{
    display: inline-block;
    width: 60px;
    padding: 3px 0;
    border-radius: 5px;
    font-weight: bold;
}
.table_user_action_pass{
    padding: 4px 7px;
    cursor: not-allowed;
    background-color: var(--item);
    color: #fff;
}
.table_user_action_pass:hover{
    background-color: #5d676c;
}
.table_user_action_del{
    padding: 4px 7px;
    background-color:#e15d5d;
    color: #fff;
}
.table_user_action_del:hover{
    background-color:#cc4747;
}
td form, td button{
    display: inline-block;
    aspect-ratio: 1;
}

@media(max-width:500px){
    tr{
        grid-template-columns: 40px 1fr 80px 0.8fr;
    }
}

#CreateLinkForm5E {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* Убедитесь что модальное окно 5E имеет те же стили что и PWA */
#CreateLinkModal5E {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    padding: 0 10px;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

#CreateLinkModal5E .CreateLinkModall {
    border: 1px solid var(--bgDark);
    background-color: var(--bgLight);
    padding: 20px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 450px;
    width: 100%;
}

#CreateLinkForm5E button[type="submit"] {
    width: 100%;
    margin-top: 10px;
}

#CreateLinkForm button[type="submit"],
#CreateLinkForm5E button[type="submit"] {
    width: 100%;
    margin: 15px 0 0 0;
    display: block;
    position: static;
    float: none;
    transform: none;
}

/* Фикс для модальных окон */
.CreateLinkModall {
    box-sizing: border-box;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

/* Кнопка закрытия */
.CreateLinkModal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

/* Стили для второй формы */
#CreateLinkForm5E input {
    background-color: var(--bgDark);
    border: 1px solid var(--bgDark);
    text-align: center;
    font-size: 18px;
    border-radius: 5px;
    font-weight: bold;
    padding: 7px;
    color: #fff;
    width: 100%;
}

#CreateLinkForm5E input:focus {
    border: 1px solid var(--brand-color);
}

/* Кнопки закрытия */
.CreateLinkModal-close-pwa,
.CreateLinkModal-close-5e {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
}

/* Анимация shake */
.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

/* Стили для ошибок */
input[style*="border: 1px solid #ff4545"] {
    border: 1px solid #ff4545 !important;
}

/* ========= МОДАЛЬНЫЕ ОКНА ========= */
.CreateLinkModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    align-items: center;
}

.CreateLinkModall {
    position: relative;
    border: 1px solid var(--bgDark);
    background-color: var(--bgLight);
    padding: 25px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* Кнопки закрытия */
.CreateLinkModal-close-pwa,
.CreateLinkModal-close-5e {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 11;
    padding: 5px;
    transition: transform 0.2s;
}

.CreateLinkModal-close-pwa:hover,
.CreateLinkModal-close-5e:hover {
    transform: scale(1.1);
}

.CreateLinkModal-close-pwa img,
.CreateLinkModal-close-5e img {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(0.7);
}

.CreateLinkModal-header {
    padding-right: 30px; /* Место для крестика */
    margin-bottom: 10px;
}

.CreateLinkModal-header p {
    font-size: 1.2rem;
    color: #fff;
    text-align: center;
    margin: 0;
}

  .header_logo {
    font-style: italic;    /* Наклонный шрифт */
    font-weight: bold;    /* Жирный шрифт */
  }