:root {
  --calm-bg1: #e4eaf6;
  --calm-bg2: #c2d4ec;
  --glass-bg: rgba(255,255,255,0.28);
  --glass-border: rgba(41,55,97,0.22);
  --main-blue: #2876d9;
  --main-green: #37bc7b;
  --main-pink: #e04b8a;
  --main-purple: #6e6edb;
  --main-grey: #f0f4fb;
  --danger: #e04b8a;
  --success: #37bc7b;
  --hint: #b78600;
  --font-main: 'Segoe UI', Arial, sans-serif;
}

html, body {
  margin: 0; padding: 0;
  width: 100vw; height: 100vh;
  background: linear-gradient(135deg, var(--calm-bg1), var(--calm-bg2) 70%);
  font-family: var(--font-main);
  min-height: 100vh;
  min-width: 100vw;
  overflow-x: hidden;
}

.screen {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  left:0; top:0;
  z-index: 1;
  background: transparent;
}

.center-container {
  z-index: 2;
  max-width: 420px;
  width: 98vw;
  margin: 0 auto;
  padding: 2.6rem 2.2rem 2.2rem 2.2rem;
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: 28px;
  box-shadow: 0 8px 32px 0 #4b6b8e24;
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.glass-title {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0.3em;
  color: var(--main-blue);
  text-align: center;
  text-shadow: 0 1px 8px #fff6;
}

.subtitle {
  font-size: 1.08rem;
  color: #3b4663;
  margin-bottom: 2.1em;
  text-align: center;
  text-shadow: 0 1px 6px #e2edffbb;
}

.difficulty-cards {
  display: flex;
  flex-direction: column;
  gap: 1.2em;
  width: 100%;
}

.radio-card {
  background: rgba(255,255,255,0.54);
  border: 1.5px solid transparent;
  border-radius: 19px;
  box-shadow: 0 2px 14px #4b6b8e13;
  padding: 1.2em 1.2em 1.1em 0.9em;
  display: flex;
  align-items: center;
  gap: 0.9em;
  cursor: pointer;
  position: relative;
  transition: border 0.21s, box-shadow 0.2s, background 0.19s;
}

.radio-card:hover, .radio-card input[type="radio"]:checked + .radio-custom {
  border-color: var(--main-blue);
  background: rgba(204, 239, 255, 0.21);
}

.radio-card input[type="radio"] {
  appearance: none;
  width: 0; height: 0; position: absolute; left: -9999px;
}

.radio-custom {
  display: inline-block;
  width: 23px; height: 23px;
  border-radius: 50%;
  border: 2.5px solid #b6faff;
  background: rgba(255,255,255,0.19);
  box-shadow: 0 2px 9px #4adeee18;
  position: relative;
  margin-right: 0.7em;
  transition: border 0.22s, box-shadow 0.21s, background 0.18s;
}

.radio-card input[type="radio"]:checked + .radio-custom {
  border: 2.5px solid var(--main-blue);
  box-shadow: 0 0 0 5px #2876d933;
  background: #eafffa;
}

.level-label {
  font-size: 1.13em;
  font-weight: 600;
  margin-bottom: 0.2em;
}
.easy-level { color: var(--main-green); }
.medium-level { color: var(--main-blue); }
.hard-level { color: var(--main-purple); }
.level-desc {
  font-size: 0.97em;
  color: #6a7b9e;
}

.glass-btn {
  background: linear-gradient(90deg, var(--main-blue), var(--main-purple));
  color: #fff;
  font-weight: 600;
  font-size: 1.18rem;
  border: none;
  border-radius: 18px;
  padding: 0.9em 2.5em;
  box-shadow: 0 2px 18px 0 #9ed6ff46;
  cursor: pointer;
  transition: background 0.22s, box-shadow 0.21s, transform 0.16s;
  letter-spacing: 1px;
  outline: none;
  width: 100%;
  max-width: 320px;
  align-self: center;
  margin-top: 2.3em;
}
.glass-btn:disabled {
  filter: grayscale(0.6) opacity(0.65);
  cursor: not-allowed;
  animation: none !important;
}
.glass-btn:not(:disabled) {
  animation: pulse-glow 1.25s infinite alternate;
}
@keyframes pulse-glow {
  from { box-shadow: 0 0 0 0 var(--main-blue); }
  to { box-shadow: 0 0 22px 7px var(--main-purple); }
}
.big-btn {
  margin-top: 2em;
}

.test-card {
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 #4b6b8e20;
  max-width: 480px;
  width: 96vw;
  margin: 0 auto;
  padding: 2.1em 1.6em 1.5em 1.6em;
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #e2e6f1;
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 1.2em;
  box-shadow: 0 2px 8px #2876d90c;
}
.progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--main-blue), var(--main-green));
  width: 0%;
  border-radius: 7px;
  transition: width 0.4s cubic-bezier(.7,.3,.3,1);
}

.test-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.3em;
}
.test-level-badge {
  background: linear-gradient(90deg, #e1f5fe 60%, #e0f2ff 100%);
  color: var(--main-blue);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.3em 1.1em;
  border-radius: 40px;
  box-shadow: 0 2px 13px #aeeaff44;
}
#question-number {
  color: var(--main-purple);
  font-size: 1rem;
}
.go-home-btn {
  background: none;
  border: none;
  color: var(--main-blue);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.22em 0.7em;
  border-radius: 10px;
  transition: background 0.13s;
}
.go-home-btn:hover {
  background: #e3eafc;
}

.test-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1em;
}
.test-question {
  min-height: 2.2em;
  font-size: 1.25rem;
  color: #16305c;
  font-weight: 600;
  margin-bottom: 0.2em;
  text-shadow: 0 1px 8px #b4d2ff22;
  word-break: break-word;
}

.glass-input {
  padding: 0.8em 1.1em;
  border-radius: 12px;
  border: 1.5px solid var(--main-blue);
  background: #fff;
  color: #28304a;
  font-size: 1.14rem;
  outline: none;
  margin-bottom: 0.2em;
  box-shadow: 0 2px 10px #2221;
  transition: border 0.18s;
}
.glass-input:focus {
  border: 2.5px solid var(--main-purple);
  background: #eafeff;
}

.test-feedback {
  min-height: 1.7em;
  font-size: 1.09rem;
  font-weight: 500;
  color: var(--danger);
  text-align: left;
  text-shadow: 0 1px 6px #fff2;
  margin-bottom: 0.15em;
  transition: color 0.2s;
}
.test-feedback.success { color: var(--success);}
.test-feedback.hint { color: var(--hint);}

.test-actions {
  display: flex;
  gap: 1.1em;
  justify-content: center;
  align-items: center;
  margin-top: 0.3em;
  flex-wrap: wrap;
}
.action-btn {
  flex: 1 1 110px;
  min-width: 110px;
  font-size: 1.1rem;
  padding: 0.7em 0.5em;
  margin: 0.2em 0;
}
.main-action {
  background: linear-gradient(90deg, var(--main-blue), var(--main-green));
  color: #fff;
}
.secondary-action {
  background: linear-gradient(90deg, #e4eaf6, #e0e0f7);
  color: var(--main-purple);
  font-weight: 500;
}

@media (max-width: 600px) {
  .center-container, .test-card {
    padding: 1.2em 0.4em 1.2em 0.4em;
    max-width: 99vw;
    width: 99vw;
    border-radius: 18px;
  }
  .glass-title { font-size: 1.3rem;}
  .subtitle { font-size: 0.97rem;}
  .test-question { font-size: 1.07rem;}
  .glass-btn, .big-btn { font-size: 1rem; padding: 0.7em 0;}
  .test-actions { gap: 0.6em; }
  .action-btn { min-width: 90px; font-size: 1em;}
}