/* 1. IMPORT THE FONT "UNBOUNDED" */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@200;300;400;500;600;700;800;900&display=swap');

:root {
    --bg-color: #050805;
    --text-white: #ffffff;
    --accent-green: #2ecc71;
    --card-bg: rgba(10, 20, 15, 0.7);
    --border-green: #1a3a2a;
    --glow-custom: rgba(56, 255, 126, 0.3); 
    --text-grey: #6e7f75; 
    --text-light-green: #C0E4CD; 
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Unbounded', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {background: #111111 url('/story-v2/bg-vec.svg') repeat;
    background-size: 300px auto;
    min-height: 100vh;
    display: flex;
    justify-content: flex-start; 
    flex-direction: column;
    color: var(--text-white);
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    overscroll-behavior: none;
    position: relative;

    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
    opacity: 1; /* Start fully visible */
    /* transform: scale(1); */
}

body.fade-out {
    opacity: 0; /* Fade to black */
    transform: scale(0.98); /* Slightly shrink back */
}

/* Background Noise: painted directly on html+body (no position:fixed layer)
   to avoid the iOS WebKit bug where fixed elements stop repainting during
   scroll/overscroll, leaving flat black below the fold */
html {
    min-height: 100%;
    background: #111111 url('/story-v2/bg-vec.svg') repeat;
    background-size: 300px auto;
}
.page-container {
    width: 100%;
    max-width: 420px; 
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 120px;
    position: relative; 
    z-index: 1; 
}

/* --- Header --- */
.page-header {
    margin-top: 62px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 8px;
}

.page-title {
    font-size: 24px;
    font-weight: 500;
    color: #e0f2e9;
    padding-left: 5px;
}

/* --- User Info Card --- */
.user-info-card {
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 164px;
  background: linear-gradient(#1F1F1F, #2C2C2C);
}

.avatar-container {
    flex-shrink: 0;
}

/* ОНОВЛЕНИЙ БЛОК АВАТАРА (Як у Dashboard) */
.avatar-box {
    width: 110px; 
    height: 110px; 
    background: transparent; /* Прозорий фон */
    border: none;
    box-shadow: none;
    position: relative; 
    margin-left: -10px; 
    margin-right: 10px;
    flex-shrink: 0;
    /* Видалено overflow: hidden, щоб картинка могла виступати */
}

/* ОНОВЛЕНА КАРТИНКА (Overlay + Tilt) */
.avatar-img {
    width: auto;
  height: 135px;
  object-fit: contain;
}

.info-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.username {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.user-id {
    font-size: 14px;
      font-weight: 400;
    color: #6A6A6A;
    margin-bottom: 15px;
}

.copy-btn {
    background: #171717;
  color: #FFF;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 400;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  font-family: 'Unbounded', sans-serif;
  border: none;
  min-width: 160px;
  white-space: nowrap;
  width: 160px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 10px 16px;
  p{
      margin-top: auto;
  margin-bottom: auto;
  }
}

/* --- Menu List (Green Buttons) --- */
.menu-list {
    display: flex;
  flex-direction: row;
  gap: 12px;
    justify-content: space-between;
}

.boxes {
    display: flex;flex-direction: row;background: linear-gradient(#1F1F1F, #2C2C2C);border-radius: 14px;min-height: 133px;  margin-bottom: 12px;
}

.boxes-amount {
    width: 50%;background: url('/images/folderboxbg.svg') no-repeat left top;padding: 16px;justify-content: flex-end;display: flex;flex-direction: column;
    h1{
        font-weight: 700;font-size: 76px;line-height: 80px;width: min-content;
    }
    p{
        font-weight: 600;font-size: 13px;width: min-content;
    }
}

.boxes-list{
    display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 10px 10px 0;
  gap: 4px;
  max-height: 125px;
  overflow-x: hidden;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
.boxes-list::-webkit-scrollbar {
  display: none;
}


.boxes-box{
    display: flex;flex-direction: row;border-radius: 9px;background: rgba(255, 255, 255, 0.03);cursor: pointer;min-width: 161px;
}
.boxes-box-titles {
    display: flex;flex-direction: column;padding: 13px 20px;
}
.boxes-box-titles p {
    font-size: 13px;
}
.boxes-box-titles p.boxes-boxstatus {
    font-size: 10px;font-weight: 300;color: #6A6A6A;
    height: 12px;
}

.boxes-box-titles p.boxes-boxstatus::after {
    content: "В процессе";
}

.boxes-check-label{
    color: white; font-weight: 600; font-size: 13px; font-family: 'Unbounded';
}
.boxes-check{
    display: flex; flex-direction: column; margin: auto;
}
.boxes-check input {
    -webkit-appearance: none;outline: none;appearance: none;background: url('data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%2018%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccircle%20cx%3D%229%22%20cy%3D%229%22%20r%3D%228.5%22%20stroke%3D%22%236A6A6A%22%2F%3E%3C%2Fsvg%3E') no-repeat center;width: 19px;height: 19px;
  cursor: pointer;
}

.boxes-box:has(.boxes-check input:checked){
  background:linear-gradient( #FFF08E, #FF991D);
  .boxes-box-titles p {
    color: black;
}
.boxes-box-titles p.boxes-boxstatus {
    color: rgba(0,0,0, 0.5); /* it was #000, and 0.5 opacity */
}
.boxes-box-titles p.boxes-boxstatus::after {
    content: "Обработан"; /* Было бы славно если бы за такие приколы доплачивали, но это никто не увидит, кроме меня. */
}
}


.boxes-check input:checked{
  background: url('data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%2018%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20opacity%3D%220.5%22%20d%3D%22M9%200C13.9706%200%2018%204.02944%2018%209C18%2013.9706%2013.9706%2018%209%2018C4.02944%2018%200%2013.9706%200%209C0%204.02944%204.02944%200%209%200ZM13.6445%205.23535C13.2222%204.87979%2012.5911%204.93338%2012.2354%205.35547L7.80664%2010.6133L5.62109%208.88281C5.18808%208.5401%204.5586%208.61292%204.21582%209.0459C3.87325%209.47887%203.94607%2010.1084%204.37891%2010.4512L7.32715%2012.7842L8.08691%2013.3867L13.7646%206.64453C14.1203%206.2222%2014.0667%205.59115%2013.6445%205.23535Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E') no-repeat center;
}

/* --- ADDED ANIMATION KEYFRAMES --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Find .menu-card and update it (specifically the overflow property) */
.menu-card {
    display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  position: relative;
  flex-direction: column;
  width: min-content;
  gap: 6px;
}

.menu-card img{
    
    width: auto;
  object-fit: contain;
  pointer-events: none;
  z-index: 10;
  height: 78px;
}


.menu-text {
    font-size: 11px;
  font-weight: 400;
  color:#fff;
  z-index: 2;
}

/* .menu-icon-box {
    width: 60px;
    height: 60px;
    background: #050a07; /* Dark box background for icon */
    /* border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #2e5545; */
    
    /* The "3D / Sticker" look (Rotated) */
    /* transform: rotate(8deg);
    box-shadow: -5px 5px 10px rgba(0,0,0,0.3);
    z-index: 2; */
/* } */


/* --- ANIMATION: Slide Up --- */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp1 {
    from {
        opacity: 0;
        transform: translateY(70px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp2 {
    from {
        opacity: 0;
        transform: translateY(90px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slideUp3 {
    from {
        opacity: 0;
        transform: translateY(110px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-slide-up {
    animation: slideUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}


/* --- Bottom Navigation (Universal) --- */
.bottom-nav {
      
   position: fixed;
  bottom: calc(30px + env(safe-area-inset-bottom));
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;max-width: 380px;
  background: linear-gradient(#1F1F1F, #2C2C2C);
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;  
  padding: 0px 24px;
  height: 61px;
  z-index: 100;
  }

.bottom-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient( to bottom, rgba(255, 255, 255, 0.16), rgba(153, 153, 153, 0) );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    padding: 12px;
    border-radius: 30px; /* Always pill shape */
        gap: 8px;
    height: 100%;
    
svg {
    fill: rgba(255,255,255, 0.25);
    transition: all 0.35s ease;
  }
  span{
    transition: all 0.35s ease;
    display: none;
  }
}

.nav-item.active {
    background: linear-gradient( #FFF08E, #FF991D);
  color: white;
  padding: 12px 24px;
  border-radius: 14px;
  z-index: 101;
  min-width: 169px;

  svg {
    fill: #111;
    
    transition: all 0.35s ease;
  }
  span{
    
    transition: all 0.35s ease;
    display: inline-block;
  }
  
}

/* --- IMAGE ICONS STYLING (NEW) --- */
.nav-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    transition: all 0.35s ease;
}


/* --- TEXT SLIDE ANIMATION --- */
.nav-item span {

   color: #111;
  font-weight: 500;
  font-size: 13px;
    transition: all 0.35s ease;
}

.chat-box{
    display: block;
  position: absolute;
  width: 276px;
  height: 144px;
  background: linear-gradient(#1F1F1F, #2C2C2C);
  border-radius: 18px;
    border-bottom-left-radius: 18px;
  border-bottom-left-radius: 8px;
   transition: all ease-in-out 0.15s;
}

#popupThing{
    width: 100vw;height: 100vh;position: fixed;background: #111;z-index: 15;opacity: 0; display: none; transition: all ease-in-out 0.15s;
}

.chat-box-close{
    width: 28px;height: 28px;background: url('/images/pixx.svg') center;position: absolute;right: -14px;top: -14px;cursor: pointer;
}

.chat-box-body{
    display: flex;flex-direction: column;padding: 24px;height: 100%;
    h1{
        font-weight: 600;font-size: 15px;padding-bottom: 8px;
    }
    p{
        font-size: 12px;font-weight: 300;line-height: 19px;padding-bottom: 12px;
    }
    .checkboxes{
        display: flex;
        flex-direction: row;
        gap: 6px;
        
input {
  -webkit-appearance: none;outline: none;appearance: none;background: url('data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%2018%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccircle%20cx%3D%229%22%20cy%3D%229%22%20r%3D%228.5%22%20stroke%3D%22%236A6A6A%22%2F%3E%3C%2Fsvg%3E') no-repeat center;width: 19px;height: 19px;
  cursor: pointer;
}

input:checked{
  background: url('data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%2018%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M9%200C13.9706%200%2018%204.02944%2018%209C18%2013.9706%2013.9706%2018%209%2018C4.02944%2018%200%2013.9706%200%209C0%204.02944%204.02944%200%209%200ZM13.6436%205.23535C13.2212%204.8798%2012.5901%204.93338%2012.2344%205.35547L7.80566%2010.6133L5.62012%208.88281C5.1871%208.5401%204.55762%208.61292%204.21484%209.0459C3.87226%209.47887%203.94509%2010.1084%204.37793%2010.4512L7.32617%2012.7842L8.08594%2013.3867L13.7637%206.64453C14.1193%206.2222%2014.0657%205.59115%2013.6436%205.23535Z%22%20fill%3D%22url(%23paint0_linear_0_3178)%22%2F%3E%3Cpath%20d%3D%22M9%200C13.9706%200%2018%204.02944%2018%209C18%2013.9706%2013.9706%2018%209%2018C4.02944%2018%200%2013.9706%200%209C0%204.02944%204.02944%200%209%200ZM13.6436%205.23535C13.2212%204.8798%2012.5901%204.93338%2012.2344%205.35547L7.80566%2010.6133L5.62012%208.88281C5.1871%208.5401%204.55762%208.61292%204.21484%209.0459C3.87226%209.47887%203.94509%2010.1084%204.37793%2010.4512L7.32617%2012.7842L8.08594%2013.3867L13.7637%206.64453C14.1193%206.2222%2014.0657%205.59115%2013.6436%205.23535Z%22%20fill%3D%22url(%23paint1_linear_0_3178)%22%2F%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22paint0_linear_0_3178%22%20x1%3D%2212.734%22%20y1%3D%2219.7234%22%20x2%3D%226.06346%22%20y2%3D%222.16907%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23F5681D%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23FFFD6A%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint1_linear_0_3178%22%20x1%3D%2212.7214%22%20y1%3D%2218%22%20x2%3D%227.82725%22%20y2%3D%226.49707%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23FF991D%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23FFF08E%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3C%2Fsvg%3E') no-repeat center;
}
    }
}
