@font-face {
  font-family: "SanFranc";
  src: url("sf.ttf");
}

@font-face {
  font-family: "Helvi";
  src: url("hn.ttf");
}

@font-face {
  font-family: "thic";
  src: url("thic.ttf");
}

/* Modern UI improvements - keep original feel but upgraded */

body {
  background-color: #EFEFF5;
  width: 100%;
  -webkit-transition: 1s;
  transition: 1s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.nMobile {
  display: none;
}

hr {
  padding: 0px;
  margin: -3px;
  border: solid 1px #E0E0E0;
  background-color: #E0E0E0;
  width: 100%;
  position: relative;
  top: 1px;
}

a {
  font-family: 'SanFranc';
  font-weight: bold;
  color: #007aff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1 {
  font-size: 115%;
  font-family: 'SanFranc';
}

h2 {
  font-size: 200%;
  font-family: 'Helvi';
  color: #616161;
}

h3 {
  font-size: 140%;
  font-family: 'Helvi';
}

h4 {
  font-size: 100%;
  font-family: 'Helvi';
  transition: 1s;
}

/* Modern select dropdowns */
select {
  padding: 8px 36px 8px 14px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1.5px solid #e5e5ea;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 450;
  color: #1c1c1e;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238e8e93' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 140px;
}

select:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

select:hover {
  border-color: #007aff;
}

.process {
  width: 100%;
  text-align: center;
  position: absolute;
  -webkit-transition: 0.7s;
  transition: 0.7s;
  background: #000;
  min-height: 100vh;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Modern header with glass effect */
.header {
  font-family: 'SanFranc';
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.04);
  padding: 16px 20px 12px;
}

.header h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #1c1c1e, #3a3a3c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.allP {
  -webkit-transition: 0.2s, opacity 0.8s;
  transition: 0.2s, opacity 0.8s;
}

.everyth {
  -webkit-transition: 1s;
  transition: 1s;
}

.csText {
  -webkit-transition: 2s;
  transition: 2s;
}

.csText h4 {
  color: #34c759;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  padding: 4px 0;
  letter-spacing: 0.5px;
}

.csText h4::before {
  content: '>';
  color: #34c759;
  margin-right: 8px;
  opacity: 0.6;
}

/* Modern survey card */
.surveys {
  -webkit-transition: 0.7s;
  transition: 0.7s;
  position: absolute;
  top: -800px;
  width: 100%;
  max-width: 560px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  margin: 16px auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  padding-bottom: 20px;
}

.surveys .header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-bottom: 1px solid #e5e5ea;
  position: relative;
  padding: 16px 20px 12px;
  max-width: 100%;
}

.surveys .header h1 {
  font-size: 20px;
  font-weight: 600;
  background: none;
  -webkit-text-fill-color: #1c1c1e;
  color: #1c1c1e;
}

.surv {
  font-size: 110%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #CCCCCC;
  border-radius: 13px;
  background-color: white;
}

/* Modern info panel */
.appear {
  -webkit-transition: 0.4s;
  transition: 0.4s;
  position: absolute;
  top: 200px;
  left: 50%;
  transform: translateX(-50%);
  visibility: hidden;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  max-width: 560px;
  width: 100%;
  margin: 16px auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

.appear .header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-bottom: 1px solid #e5e5ea;
  position: relative;
  padding: 16px 20px;
  max-width: 100%;
}

.appear .header h1 {
  font-size: 20px;
  background: none;
  -webkit-text-fill-color: #1c1c1e;
  color: #1c1c1e;
}

.tContainer {
  width: 90%;
  max-width: 560px;
  margin: 0 auto;
  padding-top: 5px;
  padding-left: 20px;
  padding-right: 20px;
  text-align: center;
}

.tContainer h2 {
  font-size: 26px;
  font-weight: 600;
  color: #1c1c1e;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tContainer h3 {
  font-size: 16px;
  font-weight: 400;
  color: #6c6c70;
}

.tContainer h4 {
  font-size: 15px;
  font-weight: 400;
  color: #6c6c70;
  line-height: 1.5;
}

.nextTo {
  white-space: nowrap;
}

/* Loading animation */
.mL {
  -webkit-transition: 0.5s;
  transition: 0.5s;
  width: 90px;
  position: relative;
  padding-top: 200px;
  opacity: 0;
}

.lBar {
  -webkit-transition: 0.5s;
  transition: 0.5s;
  width: 190px;
  height: 4px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.lPo {
  -webkit-transition: 20s;
  transition: 20s;
  width: 10px;
  height: 4px;
  background-color: #34c759;
  position: relative;
  border-radius: 30px;
  right: 2px;
}

/* Modern cards - FIXED CENTERING */
.panel {
  width: 90%;
  max-width: 560px;
  margin: 8px auto;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.panel h3 {
  font-size: 15px;
  font-weight: 500;
  color: #1c1c1e;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.panel > div {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.panel select {
  position: static !important;
}

.panelSec {
  width: 90%;
  max-width: 560px;
  margin: 8px auto;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panelSec:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.panelSec h3 {
  font-size: 15px;
  font-weight: 500;
  color: #1c1c1e;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.panelSec > div {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.panelSec select {
  position: static !important;
}

/* Fix toggle switch positioning */
.panel .onoffswitch,
.panelSec .onoffswitch {
  position: relative;
  top: 0 !important;
}

/* Modern main button */
.mainBtn {
  -webkit-transition: all 0.3s;
  transition: all 0.3s;
  font-size: 100%;
  padding: 0;
  margin: 12px auto;
  background: linear-gradient(135deg, #007aff, #0055b3);
  border: none;
  border-radius: 14px;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.25);
  cursor: pointer;
  display: block;
}

.mainBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 122, 255, 0.35);
  opacity: 1;
}

.mainBtn:active {
  transform: scale(0.97);
}

.mainBtn h3 {
  color: white !important;
  font-size: 17px;
  font-weight: 600;
  padding: 16px 20px;
  margin: 0;
  letter-spacing: 0.3px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Center the button wrapper */
#mainPart > div:last-of-type {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0 16px;
}

.ico {
  width: 28px;
  height: 28px;
  position: absolute;
  right: 20px;
  top: 18px;
  opacity: 0.6;
  transition: 0.2s;
  cursor: pointer;
}

.ico:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* Modern toggle switch */
.onoffswitch {
  position: relative;
  width: 54px;
  height: 30px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  flex-shrink: 0;
}

.onoffswitch-checkbox {
  display: none;
}

.onoffswitch-label {
  display: block;
  overflow: hidden;
  cursor: pointer;
  height: 30px;
  padding: 0;
  line-height: 30px;
  border: 2px solid #d1d1d6;
  border-radius: 30px;
  background-color: #e5e5ea;
  transition: all 0.3s;
}

.onoffswitch-label:before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  margin: 0px;
  background: #FFFFFF;
  position: absolute;
  top: 2px;
  bottom: 0;
  right: 26px;
  border: 2px solid #d1d1d6;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.onoffswitch-checkbox:checked + .onoffswitch-label {
  background-color: #007aff;
  border-color: #007aff;
}

.onoffswitch-checkbox:checked + .onoffswitch-label:before {
  right: 2px;
  border-color: #007aff;
}

/* Mobile detection page */
.nMobile {
  text-align: center;
  padding: 60px 20px;
}

.nMobile .header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border: none;
  position: relative;
  max-width: 100%;
}

.nMobile .header h1 {
  font-size: 24px;
  color: #1c1c1e;
  background: none;
  -webkit-text-fill-color: #1c1c1e;
}

.nMobile img {
  width: 120px;
  opacity: 0.6;
}

/* Responsive improvements */
@media (max-width: 480px) {
  .panel, .panelSec {
    padding: 14px 16px;
    flex-wrap: wrap;
  }
  
  .tContainer {
    padding: 16px;
  }
  
  .tContainer h2 {
    font-size: 22px;
  }
  
  .mainBtn {
    max-width: 100%;
    margin: 12px 16px;
    min-width: 0;
    width: auto;
  }
  
  select {
    font-size: 13px;
    padding: 6px 30px 6px 10px;
    min-width: 120px;
  }
  
  .surveys {
    width: calc(100% - 16px);
  }
  
  .appear {
    margin: 8px;
    width: calc(100% - 16px);
  }
}

/* Smooth transitions */
#mainPart {
  transition: opacity 0.4s, visibility 0.4s;
}

#appe {
  transition: opacity 0.4s, visibility 0.4s, top 0.4s;
}

/* Modern scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #c6c6c8;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8ad;
}