/* ========= Base ========= */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;

  background: #000 url("../img/bg.webp") no-repeat center center;
  background-size: cover;

  font-family: Arial, Helvetica, sans-serif;
  color: #e9f2ff;

  /* fixed красиво на десктопе, но на мобилках может глючить.
     Если будет дергаться — убери строку ниже */
  background-attachment: fixed;
}

a { color: rgba(160,205,255,.95); text-decoration: none; }
a:hover { text-decoration: underline; color: #fff; }

img { border: 1px solid rgba(81,98,116,.65); }
a img:hover { border-color: #fff; }

/* ========= Layout (start page) ========= */
/* ВАЖНО: работает, если ты обернул главную в .start-layout (как я писал ранее) */

.start-layout{
  width: min(1100px, calc(100% - 40px));
  margin: 70px auto 0;

  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;

  align-items: start;
}

@media (max-width: 900px){
  .start-layout{
    grid-template-columns: 1fr;
    margin-top: 50px;
  }
}

/* ========= Left menu card ========= */

.start-menu{
  padding: 12px 12px 10px;
  text-align: left;

  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* old mainmenu styling cleanup */
#mainmenu{
  position: static !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;

  font-size: 12px;
  font-weight: bold;
  color: #b1daf2;
  text-align: left;
}

#mainmenu a{
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  color: rgba(177,218,242,.95);
}

#mainmenu a:hover{
  background: rgba(255,255,255,.06);
  color: #fff;
}

/* optional: dot marker */
.menupoint{
  padding-left: 12px;
  background: url("../img/point.png") no-repeat left center;
}

/* ========= Inputs ========= */

.eingabe{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.35);
  color: #e9f2ff;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  outline: none;
}

.eingabe:focus{
  border-color: rgba(120,180,255,.55);
  box-shadow: 0 0 0 3px rgba(80,140,255,.15);
}

/* ========= Home card (welcome/register) ========= */

.home-card{
  width: 100%;
  margin: 0 0 16px 0;
  text-align: left;

  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;

  position: static !important; /* kill legacy absolute */
}

.home-head{
  padding: 14px 18px;
  background: rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.home-title{
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #e9f2ff;
}

.home-body{
  padding: 16px 18px 18px;
}

.home-text{
  color: rgba(233,242,255,.92);
  font-size: 13px;
  line-height: 1.5;
}

.home-text1{ margin-bottom: 14px; }
.home-text2{ margin-top: 12px; opacity: .9; }

.home-cta{
  display: flex;
  justify-content: center;
  margin: 14px 0;
}

.home-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 18px;
  border-radius: 10px;

  text-decoration: none;
  font-weight: 700;
  letter-spacing: .2px;

  color: #eaf6ff;
  border: 1px solid rgba(120,180,255,.40);
  background: linear-gradient(180deg, rgba(60,140,255,.35), rgba(30,70,150,.35));

  box-shadow: 0 8px 18px rgba(0,0,0,.35);
  transition: transform .12s ease, filter .12s ease, border-color .12s ease;
}

.home-btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.08);
  border-color: rgba(140,200,255,.65);
}

.home-btn:active{
  transform: translateY(0);
  filter: brightness(0.98);
}

@media (max-width: 520px){
  .home-title{ font-size: 16px; }
  .home-btn{ width: 100%; }
}

/* ========= Login card ========= */

.login-card{
  width: 100%;
  margin: 0;
  text-align: left;

  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;

  padding: 14px 16px 12px;

  position: static !important; /* kill legacy absolute */
  left: auto !important;
  top: auto !important;
  height: auto !important;
  background-image: none !important;
}

.login-form{ margin: 0; }

.login-row{
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.login-label{
  display: grid;
  gap: 6px;
}

.login-label-text{
  font-size: 12px;
  opacity: .75;
  color: #e9f2ff;
}

.login-btn{
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;

  border: 1px solid rgba(120,180,255,.40);
  background: linear-gradient(180deg, rgba(60,140,255,.35), rgba(30,70,150,.35));
  color: #eaf6ff;

  font-weight: 700;
  cursor: pointer;

  box-shadow: 0 8px 18px rgba(0,0,0,.35);
  transition: transform .12s ease, filter .12s ease, border-color .12s ease;
}

.login-btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.08);
  border-color: rgba(140,200,255,.65);
}

.login-btn:active{
  transform: translateY(0);
  filter: brightness(0.98);
}

.login-foot{
  display: flex;
  justify-content: space-between;
  gap: 12px;

  margin-top: 12px;
  padding-top: 10px;

  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  color: rgba(233,242,255,.85);
}

.login-copy{
  margin-top: 10px;
  font-size: 12px;
  opacity: .7;
  color: rgba(233,242,255,.85);
}

.login-downmenu{
  margin-top: 6px;
  font-size: 12px;
  opacity: .75;
}

.login-sep{ padding: 0 8px; opacity: .6; }

@media (max-width: 860px){
  .login-row{
    grid-template-columns: 1fr 1fr;
  }
  .login-btn{
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 520px){
  .login-row{
    grid-template-columns: 1fr;
  }
}

/* ========= Kill legacy startpage absolute blocks (safe overrides) ========= */
/* Эти селекторы оставлены, чтобы старые части не ломали новую разметку */

#login,
.rightmenu,
.rightmenu_big,
.rightmenu_register,
#title,
#content,
#register,
#text2,
#login_input,
#login_text_1,
#login_text_2,
#downmenu,
#copyright{
  position: static !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  height: auto !important;
  background-image: none !important;
}

/* старые классы-кнопки — приводим к виду */
.bigbutton{
  font-size: 16px;
  font-weight: 700;
  color: #eaf6ff;
  cursor: pointer;
}

.bigbutton:hover{ color: #fff; }

.warning{ color:#ff7876; }
.fine{ color:#00ff00; }

.langbar{
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;

  width: min(1100px, calc(100% - 40px));
  margin: 12px auto 0;

  padding: 8px 10px;
  border-radius: 12px;

  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.10);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.langbar-flags{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.langbar-flag{
  display: inline-flex;
  width: 22px;
  height: 14px;
  border-radius: 3px;
  overflow: hidden;

  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.25);

  transition: transform .12s ease, border-color .12s ease, filter .12s ease;
}

.langbar-flag img{
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.langbar-flag:hover{
  transform: translateY(-1px);
  border-color: rgba(140,200,255,.65);
  filter: brightness(1.05);
}

.langbar-label{
  font-size: 12px;
  opacity: .85;
  color: rgba(233,242,255,.90);
  white-space: nowrap;
}

.langbar-label:hover{
  opacity: 1;
  text-decoration: underline;
}

/* общий "как языки" */
.glass-card{
  background: rgba(0,0,0,.38);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* конкретно для истории */
.story-card{
  padding: 18px 20px;
  margin: 18px 0;
  color: rgba(233,242,255,.92);
}

/* чтобы текст читался */
.story-card p{
  line-height: 1.6;
  margin: 10px 0;
}

.glass-card{
  background: rgba(0,0,0,.38);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* общий контейнер страницы справа */
.page-card{
  width: min(980px, calc(100% - 32px));
  margin: 24px auto;
  padding: 18px 20px;
  text-align: left;
  color: rgba(233,242,255,.92);
}

        /* ===== Register page (scoped) ===== */
        .reg-page{
            width: min(1200px, calc(100% - 32px));
            margin: 20px auto;
            display: grid;
            grid-template-columns: 220px 1fr;
            gap: 18px;
            align-items: start;
        }

        /* Left menu */
        .reg-left{
            position: sticky;
            top: 16px;
        }
        .reg-left .reg-menu{
            padding: 14px 14px;
            border-radius: 14px;
            background: rgba(0,0,0,.38);
            border: 1px solid rgba(255,255,255,.14);
            box-shadow: 0 10px 30px rgba(0,0,0,.45);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            text-align: left;
        }
        .reg-left .reg-menu a{
            display: block;
            padding: 6px 8px;
            border-radius: 10px;
            color: rgba(233,242,255,.85);
            text-decoration: none;
        }
        .reg-left .reg-menu a:hover{
            background: rgba(255,255,255,.06);
            color: #fff;
        }

        /* Right card */
        .reg-card{
            padding: 18px 20px;
            border-radius: 14px;
            background: rgba(0,0,0,.38);
            border: 1px solid rgba(255,255,255,.14);
            box-shadow: 0 10px 30px rgba(0,0,0,.45);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            text-align: left;
            color: rgba(233,242,255,.92);
            min-height: 220px;
            overflow: hidden;
        }

        /* Normalize tpl chaos (scoped) */
        .reg-card *{ box-sizing: border-box; }

        .reg-card table{
            width: 100%;
            border-collapse: collapse;
            color: rgba(233,242,255,.90);
            font-size: 13px;
        }
        .reg-card td{
            padding: 8px 10px;
            vertical-align: middle;
            text-align: left;
        }

        .reg-card .eingabe,
        .reg-card input[type="text"],
        .reg-card input[type="password"],
        .reg-card input[type="email"],
        .reg-card select{
            width: 100%;
            max-width: 520px;
            padding: 10px 12px;
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,.14);
            background: rgba(0,0,0,.35);
            color: rgba(233,242,255,.95);
            outline: none;
        }
        .reg-card .eingabe:focus,
        .reg-card input:focus,
        .reg-card select:focus{
            border-color: rgba(120,180,255,.55);
            box-shadow: 0 0 0 3px rgba(80,140,255,.15);
        }

        .reg-card input[type="checkbox"]{
            transform: scale(1.05);
        }

        .reg-card input[type="submit"],
        .reg-card button{
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 10px 16px;
            border-radius: 12px;
            border: 1px solid rgba(120,180,255,.40);
            background: linear-gradient(180deg, rgba(60,140,255,.35), rgba(30,70,150,.35));
            color: #eaf6ff;
            font-weight: 700;
            cursor: pointer;
            text-decoration: none;
        }
        .reg-card input[type="submit"]:hover,
        .reg-card button:hover{
            filter: brightness(1.08);
        }

        /* Kill absolute inline styles inside tpl (common in old templates) */
        .reg-card [style*="position:absolute"]{
            position: static !important;
            left: auto !important;
            top: auto !important;
            width: auto !important;
        }

        /* Mobile */
        @media (max-width: 900px){
            .reg-page{ grid-template-columns: 1fr; }
            .reg-left{ position: static; }
        }

        
/* ===== REGISTER SUBMIT BUTTON (SAFE OVERRIDE) ===== */

#register_submit{
    display: flex;
    align-items: center;
    justify-content: center;

    margin: 16px auto 0;
    padding: 10px 18px;

    min-width: 220px;
    height: 42px;

    border-radius: 12px;
    border: 1px solid rgba(120,180,255,.45);
    background: linear-gradient(
        180deg,
        rgba(70,150,255,.45),
        rgba(35,80,170,.45)
    );

    font-size: 13px;
    font-weight: 800;
    letter-spacing: .2px;
    color: #eaf6ff;

    cursor: pointer;
    user-select: none;
    text-align: center;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.15),
        0 8px 20px rgba(0,0,0,.45);

    transition:
        transform .12s ease,
        filter .12s ease,
        box-shadow .12s ease,
        border-color .12s ease;
}

/* hover */
#register_submit:hover{
    transform: translateY(-1px);
    filter: brightness(1.08);
    border-color: rgba(160,210,255,.75);
}

/* active */
#register_submit:active{
    transform: translateY(0);
    filter: brightness(0.98);
    box-shadow:
        inset 0 2px 6px rgba(0,0,0,.35),
        0 4px 10px rgba(0,0,0,.4);
}

/* mobile */
@media (max-width: 600px){
    #register_submit{
        width: 100%;
        min-width: unset;
    }
}

/* ===== Screenshots grid ===== */

#contentscroll{
    padding: 10px;
    text-align: center;
}

.shots-grid{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

/* thumbnails */
.shot{
    display: block;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 8px 22px rgba(0,0,0,.45);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.shot img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shot:hover{
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(160,210,255,.65);
    box-shadow: 0 14px 36px rgba(0,0,0,.65);
}

/* wallpapers – крупнее */
.shots-wallpapers{
    grid-template-columns: repeat(2, 1fr);
}

.shot.wide{
    aspect-ratio: 16 / 9;
}

/* ===== Headline ===== */

.headline{
    margin: 18px 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: #eaf6ff;
    letter-spacing: .3px;
}

/* ===== Responsive ===== */

/* tablets */
@media (max-width: 1100px){
    .shots-grid{
        grid-template-columns: repeat(3, 1fr);
    }
}

/* small tablets */
@media (max-width: 820px){
    .shots-grid{
        grid-template-columns: repeat(2, 1fr);
    }
}

/* phones */
@media (max-width: 520px){
    .shots-grid{
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .shot{
        border-radius: 12px;
    }
}
