/* Base Styles */
:root {
  /* Основные цвета */
  --primary-500: #643CF4;   /* Основной фиолетовый */
  --primary-400: #8266F6;   /* Более светлый фиолетовый */
  --primary-600: #4D2FD1;   /* Более темный фиолетовый */
  
  /* Фоновые цвета */
  --bg-900: #0A0A0F;       /* Самый темный фон */
  --bg-800: #121218;       /* Темный фон */
  --bg-700: #1A1A24;       /* Средний фон */
  --bg-600: #242430;       /* Светлый фон */
  
  /* Текст */
  --text-primary: #FFFFFF;  /* Основной текст */
  --text-secondary: #B8B8C5; /* Вторичный текст */
  --text-tertiary: #7E7E8F;  /* Третичный текст */
  
  /* Границы */
  --border-700: #2D2D3A;    /* Темные границы */
  --border-600: #3A3A4A;    /* Светлые границы */
  
  /* Дополнительные цвета */
  --accent-green: #2BAD72;  /* Зеленый для успешных операций */
  --accent-red: #E74C3C;    /* Красный для ошибок */
  --accent-blue: #0BACE6;   /* Голубой для информации */
  
  /* Размеры */
  --header-height: 60px;
  --mobile-breakpoint: 768px;
  
  /* Тени */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.2);
  --shadow-primary: 0 0 15px rgba(100, 60, 244, 0.5);

  --primary-color: #643CF4;
  --secondary-color: #151515;
  --dark-bg: rgba(30, 30, 30, 0.9);
  --text-color: #fff;
  --text-secondary: #989898;
  --header-height: 60px;
  --mobile-breakpoint: 768px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::selection {
  background: var(--primary-color);
  color: #ffffff;
}

::-moz-selection {
  background: var(--primary-color);
  color: #ffffff;
}

body {
  background-color: var(--secondary-color);
  color: var(--text-color);
  font-family: 'Jura', 'Arial Narrow', Arial, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  position: relative;
  flex-direction: column;
}

#svg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
}

/* Header Styles */
.top-header {
  position: fixed;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: var(--header-height);
  padding: 0 5%;
  background-color: var(--bg-700);
  z-index: 100;
}

.logotype {
  width: 70px;
  height: 70px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3c?xml version='1.0' standalone='no'?%3e%3c!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 20010904//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'%3e%3csvg version='1.0' xmlns='http://www.w3.org/2000/svg' width='1024.000000pt' height='1024.000000pt' viewBox='0 0 1024.000000 1024.000000' preserveAspectRatio='xMidYMid meet'%3e%3cg transform='translate(0.000000,1024.000000) scale(0.100000,-0.100000)' fill='%23643CF4' stroke='none'%3e%3cpath d='M2811 8239 c-336 -44 -615 -294 -704 -629 l-22 -85 0 -1725 c0 -1930 -4 -1805 72 -2045 119 -377 363 -691 713 -918 202 -131 1577 -955 1675 -1005 178 -88 370 -132 585 -132 152 0 265 16 392 56 162 51 157 49 923 512 1069 647 1046 632 1221 807 245 244 387 509 466 866 l23 104 0 1740 0 1740 -22 85 c-46 175 -152 341 -285 449 -77 63 -216 133 -323 163 l-80 23 -2285 1 c-1257 1 -2314 -2 -2349 -7z m4640 -339 c163 -51 283 -162 342 -318 l22 -57 0 -1740 c0 -1666 -1 -1743 -19 -1820 -84 -362 -273 -632 -589 -843 -40 -27 -291 -180 -559 -342 l-487 -293 -233 174 c-128 96 -270 202 -315 237 l-83 63 0 713 0 712 228 154 c125 85 312 212 415 282 104 71 195 132 203 135 12 4 14 -34 14 -264 0 -429 -7 -443 -326 -680 l-184 -136 0 -415 c0 -330 3 -412 13 -405 6 6 55 43 107 83 297 229 653 513 708 564 146 137 257 317 304 496 22 85 22 87 25 1018 2 512 1 932 -2 932 -3 0 -80 -50 -172 -111 -615 -412 -1150 -757 -1246 -805 -300 -152 -641 -161 -946 -26 -102 45 -159 82 -1154 739 -170 111 -310 203 -313 203 -2 0 -4 -399 -4 -887 0 -738 3 -904 15 -980 35 -213 131 -397 292 -554 58 -57 833 -679 846 -679 1 0 1 187 -1 415 l-2 414 -180 137 c-202 153 -259 210 -292 292 -21 54 -23 72 -26 355 -2 163 0 297 3 297 4 0 106 -68 228 -151 122 -83 313 -212 425 -286 l202 -136 0 -712 0 -713 -317 -237 c-292 -219 -318 -237 -337 -225 -12 8 -237 144 -501 303 -264 159 -516 314 -560 345 -102 71 -277 245 -342 342 -96 142 -157 282 -201 460 l-26 105 -4 1700 c-2 1241 0 1716 8 1760 34 180 184 342 361 389 46 13 373 15 2325 15 2241 1 2273 1 2335 -19z'/%3e%3cpath d='M4659 7075 c-250 -251 -455 -459 -457 -463 -3 -10 902 -912 915 -912 5 0 216 204 469 454 l459 454 -460 461 c-253 254 -462 461 -466 461 -3 0 -210 -205 -460 -455z'/%3e%3c/g%3e%3c/svg%3e ");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.header-nav {
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
  justify-content: center;
  margin-left: 0;
}

.header-menu {
  display: flex;
  height: 100%;
  margin: 0;
  align-items: center;
  padding: 0;
  list-style: none;
  gap: clamp(10px, 3vw, 30px);
}

.header-item {
  display: flex;
  align-items: center;
  position: relative;
}

.header-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: clamp(14px, 2vw, 25px);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px clamp(5px, 1.5vw, 15px);
  transition: color 0.3s ease;
  white-space: nowrap;
}

.header-link:hover {
  color: var(--primary-color);
}

.header-item::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 15px;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.header-item:hover::after {
  width: calc(100% - 30px);
}

.header-actions {
  position: absolute;
  right: 5%;
  display: flex;
  align-items: center;
  gap: 15px;
}

.login-button {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: clamp(14px, 2vw, 25px);
  transition: color 0.3s ease;
  white-space: nowrap;
}

.login-button:hover {
  color: var(--primary-color);
}

.login-svg {
    display: flex;
    align-items: right;
    justify-content: right;
    width: 21px;
    height: 21px;
    margin-left: 0;
}

.login-svg svg {
    width: 100%;
    height: 100%;
}

.selection {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 70px;
  width: 34.9%;
  max-width: 1200px;
  margin: calc(var(--header-height) + 100px) auto 100px;
  padding: 40px;
  border-radius: 8px;
  min-height: 40vh;
  max-height: 67.41vh;
  overflow-y: auto;
  background: var(--dark-bg);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.main-logo{
    width: 400px;
    height: 400px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3c?xml version='1.0' standalone='no'?%3e%3c!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 20010904//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'%3e%3csvg version='1.0' xmlns='http://www.w3.org/2000/svg' width='1024.000000pt' height='1024.000000pt' viewBox='0 0 1024.000000 1024.000000' preserveAspectRatio='xMidYMid meet'%3e%3cg transform='translate(0.000000,1024.000000) scale(0.100000,-0.100000)' fill='%23643CF4' stroke='none'%3e%3cpath d='M2811 8239 c-336 -44 -615 -294 -704 -629 l-22 -85 0 -1725 c0 -1930 -4 -1805 72 -2045 119 -377 363 -691 713 -918 202 -131 1577 -955 1675 -1005 178 -88 370 -132 585 -132 152 0 265 16 392 56 162 51 157 49 923 512 1069 647 1046 632 1221 807 245 244 387 509 466 866 l23 104 0 1740 0 1740 -22 85 c-46 175 -152 341 -285 449 -77 63 -216 133 -323 163 l-80 23 -2285 1 c-1257 1 -2314 -2 -2349 -7z m4640 -339 c163 -51 283 -162 342 -318 l22 -57 0 -1740 c0 -1666 -1 -1743 -19 -1820 -84 -362 -273 -632 -589 -843 -40 -27 -291 -180 -559 -342 l-487 -293 -233 174 c-128 96 -270 202 -315 237 l-83 63 0 713 0 712 228 154 c125 85 312 212 415 282 104 71 195 132 203 135 12 4 14 -34 14 -264 0 -429 -7 -443 -326 -680 l-184 -136 0 -415 c0 -330 3 -412 13 -405 6 6 55 43 107 83 297 229 653 513 708 564 146 137 257 317 304 496 22 85 22 87 25 1018 2 512 1 932 -2 932 -3 0 -80 -50 -172 -111 -615 -412 -1150 -757 -1246 -805 -300 -152 -641 -161 -946 -26 -102 45 -159 82 -1154 739 -170 111 -310 203 -313 203 -2 0 -4 -399 -4 -887 0 -738 3 -904 15 -980 35 -213 131 -397 292 -554 58 -57 833 -679 846 -679 1 0 1 187 -1 415 l-2 414 -180 137 c-202 153 -259 210 -292 292 -21 54 -23 72 -26 355 -2 163 0 297 3 297 4 0 106 -68 228 -151 122 -83 313 -212 425 -286 l202 -136 0 -712 0 -713 -317 -237 c-292 -219 -318 -237 -337 -225 -12 8 -237 144 -501 303 -264 159 -516 314 -560 345 -102 71 -277 245 -342 342 -96 142 -157 282 -201 460 l-26 105 -4 1700 c-2 1241 0 1716 8 1760 34 180 184 342 361 389 46 13 373 15 2325 15 2241 1 2273 1 2335 -19z'/%3e%3cpath d='M4659 7075 c-250 -251 -455 -459 -457 -463 -3 -10 902 -912 915 -912 5 0 216 204 469 454 l459 454 -460 461 c-253 254 -462 461 -466 461 -3 0 -210 -205 -460 -455z'/%3e%3c/g%3e%3c/svg%3e ");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin: 0 auto;
    
}

.LoginTG {
    font-family: 'Jura', sans-serif;
    font-size: clamp(14px, 2vw, 18px);
    color: white;
    padding: 12px 24px;
    cursor: pointer;
    outline: none;
    box-shadow: 0 0 15px rgba(84, 169, 235, 0.7);
    border: none;
    border-radius: 16px;
    background: #54A9EB;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: fit-content;
}
.LoginTG:hover{
    box-shadow: 0 0 25px rgba(84, 169, 235, 0.9);
}

.content-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.text-content {
  flex: 1;
  min-width: 300px;
}

.main-title {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.2;
}

.subtitle {
  color: var(--text-secondary);
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 600px;
}

.buttons-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 500;
  font-size: clamp(12px, 1.5vw, 14px);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.button-primary,
.button-secondary,
.button-outline {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 0 15px rgba(100, 60, 244, 0.7);
}

.button:hover {
  box-shadow: 0 0 25px rgba(100, 60, 244, 0.9);
  transform: translateY(-2px);
}

.image-wrapper {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-image {
  max-width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
}

/* Footer Elements */
.site-footer {
    margin-top: auto; /* Прижимает футер к низу */
    width: 100%;
    padding: 20px 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    align-items: center;
}

.footer-container {
  margin-top: auto;
  width: 100%;
  padding: 20px 5%;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}


#telegram-login-button {
  margin: 20px 0;
  display: flex;
  justify-content: center;
}

.tgme_widget_login {
  width: 240px !important;
  height: 40px !important;
  border-radius: 4px !important;
  transition: all 0.3s ease !important;
}

.tgme_widget_login:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 60, 244, 0.3);
}


.MultiRSTeam {
    color: var(--text-secondary);
    font-size: clamp(1px, 1.5vw, 12px);
    font-weight: 600;
    white-space: nowrap;
}

.header-actions {
  position: absolute;
  right: 5%;
  display: flex;
  align-items: center;
  gap: 15px;
}


.header-id-balance {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 10px;
  cursor: pointer;
}

.header-id {
  font-size: 14px;
  color: #fff;
  font-family: 'Jura', sans-serif;
  font-weight: 500;
}

.header-balance {
  font-size: 14px;
  color: var(--primary-color);
  font-family: 'Jura', sans-serif;
  font-weight: 700;
}

.header-image {
  width: 48px;
  height: 48px;
  border-radius: 40px;
  background-color: #444;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.header-image:hover {
  transform: scale(1.05);
}

.header-id-balance:hover .header-id,
.header-id-balance:hover .header-balance {
  opacity: 0.8;
}

/* Auth Container */
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background: var(--bg-700);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-600);
}

/* Terms Agreement Checkbox */
.terms-agreement {
    width: 100%;
    margin-bottom: 15px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    user-select: none;
    color: var(--text-secondary);
    font-size: 14px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: var(--bg-600);
    border: 2px solid var(--primary-500);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: var(--bg-600);
    border-color: var(--primary-400);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-500);
    border-color: var(--primary-500);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.terms-text a {
    color: var(--primary-400);
    text-decoration: none;
    transition: color 0.3s ease;
}

.terms-text a:hover {
    color: var(--primary-500);
    text-decoration: underline;
}

/* Telegram Button */
#telegram-login-button {
    width: 100%;
    display: flex;
    justify-content: center;
    opacity: 0.5;
    pointer-events: none;
    transition: all 0.3s ease;
}

#telegram-login-button.enabled {
    opacity: 1;
    pointer-events: all;
}

.tgme_widget_login {
    width: 100% !important;
    height: 50px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.tgme_widget_login:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(84, 169, 235, 0.4) !important;
}

/* Auth Footer */
.auth-footer {
    margin-top: 10px;
    color: var(--text-tertiary);
    font-size: 12px;
    text-align: center;
    line-height: 1.4;
}

/* Disabled State */
.disabled {
    position: relative;
}

.disabled::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 30, 30, 0.7);
    border-radius: 8px;
    cursor: not-allowed;
}

@media (max-width: 1440px) {
  .selection {
    width: 45%;
    gap: 60px;
    padding: 35px;
  }
  
  .main-logo {
    width: 300px;
    height: 238px;
  }
}

/* Mobile Adaptations */
@media (max-width: 1024px) {
  .top-header {
    height: 50px;
  }

  .header-menu {
    gap: 10px;
  }

  .header-nav {
    margin-right: 10%;
  }

  .selection {
    width: 60%;
    gap: 50px;
    padding: 30px;
    min-height: 50vh;
  }
  
  .main-logo {
    width: 280px;
    height: 222px;
  }
}

@media (max-width: 768px) {
  .top-header {
    height: 50px;
  }

  .top-header {
    padding: 0 15px;
  }
  
  .header-nav {
    justify-content: space-between;
  }
  
  .header-menu {
    display: none;
  }

  .selection {
    width: 75%;
    gap: 40px;
    padding: 25px;
    margin-top: calc(var(--header-height) + 50px);
    min-height: 60vh;
  }
  
  .main-logo {
    width: 250px;
    height: 198px;
  }

  .content-wrapper {
    flex-direction: column;
  }
  
  .image-wrapper {
    order: -1;
  }
  
  .buttons-group {
    justify-content: center;
  }
  
  .footer-container {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .top-header {
    height: 50px;
  }
  .selection {
    width: 90%;
    gap: 30px;
    padding: 20px;
    min-height: 70vh;
    max-height: none;
  }
  
  .main-logo {
    width: 200px;
    height: 158px;
  }
  
  .LoginTG {
    padding: 10px 20px;
    font-size: clamp(12px, 4vw, 16px);
  }
  
  .buttons-group {
    flex-direction: column;
    width: 100%;
  }
  
  .button {
    width: 100%;
  }
  
  .header-actions {
    position: absolute;
  }
  
  .preview-image {
    max-height: 300px;
  }
}

@media (max-width: 320px) {
  .top-header {
    height: 50px;
  }

  .selection {
    width: 95%;
    gap: 25px;
    padding: 15px;
  }
  
  .main-logo {
    width: 180px;
    height: 143px;
  }
  
  .main-title {
    font-size: 28px;
  }
  
  .button {
    padding: 10px 15px;
  }
  
  .preview-image {
    max-height: 250px;
  }
}