:root {
  --astrill-bg: #3F3D88;
  --astrill-selected-bg: #645EB4;
  --astrill-border-default: #777CB0;
  --astrill-border-selected: #FF4448;
  --astrill-ring-outer: #44418D;
  --astrill-ring-inner: #4B4794;
  --astrill-red: #F54650;
  --astrill-green: #95C900;
  --astrill-text-primary: #FFFFFF;
  --astrill-text-muted: #A7A7C8;
  --astrill-input-bg: #F0F1F5;
  --astrill-input-text: #2F2F4C;
  --astrill-radius-window: 34px;
  --astrill-radius-input: 14px;
  --astrill-radius-chip: 22px;
  --astrill-radius-card: 18px;
  --astrill-radius-item: 10px;
}

html, body, #app {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #2a2845;
}

.astrill-shell {
  width: 390px;
  height: 844px;
  margin: 0 auto;
  background: var(--astrill-bg);
  border-radius: var(--astrill-radius-window);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,0.4);
}

.astrill-page {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 24px 24px;
}

.astrill-page::-webkit-scrollbar { width: 0; }

/* Exit pill */
.btn-exit-pill {
  background: #764C9A;
  color: #F2E8FF;
  border: none;
  border-radius: 10px;
  padding: 2px 9px;
  font-size: 11px;
  line-height: 22px;
  cursor: pointer;
  float: right;
  margin: 4px 12px 0 0;
}

/* Login image */
.login-image {
  display: block;
  margin: 58px auto 0;
  width: 302px;
  height: 74px;
  object-fit: contain;
}

.login-title {
  text-align: center;
  font-size: 35px;
  color: #E4E6F9;
  margin: 44px 0 28px;
  font-weight: 400;
}

/* Input shell */
.input-shell {
  background: var(--astrill-input-bg);
  border-radius: var(--astrill-radius-input);
  padding: 0 12px;
  min-height: 42px;
  display: flex;
  align-items: center;
}

.input-shell .input-icon {
  width: 14px;
  height: 14px;
  fill: #8D90B8;
  flex-shrink: 0;
}

.input-shell input {
  background: transparent;
  border: none;
  outline: none;
  flex: 1;
  padding: 0 0 0 8px;
  font-size: 14px;
  color: var(--astrill-input-text);
  height: 42px;
}

.input-shell input::placeholder {
  color: #8D90B8;
}

/* Link button */
.btn-link {
  background: none;
  border: none;
  color: #AAB0DF;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* Remember checkbox */
.remember-checkbox {
  color: #9FA5D5;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 20px 0 0 2px;
}

.remember-checkbox input {
  accent-color: var(--astrill-border-selected);
}

/* Primary button */
.btn-primary {
  background: #DE727C;
  color: #FCE9EB;
  border: none;
  border-radius: var(--astrill-radius-input);
  padding: 12px 18px;
  min-height: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: center;
  margin-top: 12px;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Header bar */
.header-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0;
  margin-bottom: 10px;
}

.header-bar-title {
  text-align: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
}

.btn-icon {
  width: 42px;
  height: 42px;
  border: 1px solid var(--astrill-border-default);
  border-radius: 21px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, border-color 0.15s;
}

.btn-icon:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--astrill-border-selected);
}

.btn-icon svg {
  stroke: #D3D8FF;
  stroke-width: 2.2;
}

.btn-icon span {
  color: #D3D8FF;
  font-size: 18px;
}

/* Server chip */
.server-chip {
  background: var(--astrill-selected-bg);
  border: none;
  border-radius: var(--astrill-radius-chip);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  width: 290px;
  margin: 6px auto 0;
}

.server-chip-flag {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
}

.server-chip-info {
  text-align: left;
}

.server-chip-country {
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.server-chip-ip {
  color: var(--astrill-text-muted);
  font-size: 12px;
}

.server-chip-arrow {
  width: 16px;
  height: 16px;
}

/* Power button rings */
.power-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px auto 0;
  width: 286px;
  height: 286px;
  position: relative;
}

.ring-outer {
  position: absolute;
  width: 286px;
  height: 286px;
  border-radius: 143px;
  background: var(--astrill-ring-outer);
  opacity: 0.55;
}

.ring-inner {
  position: absolute;
  width: 236px;
  height: 236px;
  border-radius: 118px;
  background: var(--astrill-ring-inner);
  opacity: 0.55;
}

.power-button-shell {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 80px;
  overflow: hidden;
}

.power-button-bg {
  width: 100%;
  height: 100%;
}

.power-button-bg.disconnected { background: #F0F2F7; }
.power-button-bg.connected { background: var(--astrill-green); }

.power-button {
  position: absolute;
  inset: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.power-button img {
  width: 58px;
  height: 58px;
}

/* Status text */
.status-text {
  text-align: center;
  margin: 16px 0 0;
  font-weight: 600;
  font-size: 14px;
}
.status-text.connected { color: var(--astrill-green); }
.status-text.disconnected { color: var(--astrill-text-muted); }

/* Session timer */
.session-timer {
  font-size: 52px;
  color: white;
  text-align: center;
  font-weight: 600;
  margin: 24px 0 0;
}

/* Session info */
.session-info {
  text-align: center;
  color: var(--astrill-text-muted);
  font-size: 13px;
  margin: 8px 0 0;
}
.session-info span { color: white; }

/* Metric card */
.metric-card {
  background: var(--astrill-selected-bg);
  border-radius: var(--astrill-radius-card);
  padding: 12px 18px;
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.metric-icon.upload { background: var(--astrill-red); }
.metric-icon.download { background: var(--astrill-green); }

.metric-value {
  color: white;
  font-size: 14px;
  line-height: 1.2;
}

.metric-label {
  color: var(--astrill-text-muted);
  font-size: 12px;
  line-height: 1.2;
}

.metric-divider {
  width: 1px;
  height: 42px;
  background: #817DBD;
  margin: 0 20px;
}

/* Search shell */
.search-shell {
  background: var(--astrill-input-bg);
  border-radius: var(--astrill-radius-input);
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.search-shell svg {
  fill: #8D90B8;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin: 0 8px 0 10px;
}

.search-shell input {
  background: transparent;
  border: none;
  outline: none;
  flex: 1;
  padding: 0 10px 0 0;
  font-size: 14px;
  color: var(--astrill-input-text);
  height: 42px;
}

.search-shell input::placeholder {
  color: #8D90B8;
}

/* Section title */
.section-title {
  color: white;
  font-size: 17px;
  margin: 16px 0 10px;
}

/* Server list item */
.server-item {
  background: transparent;
  border: 1px solid var(--astrill-border-default);
  border-radius: var(--astrill-radius-item);
  padding: 0;
  margin: 0 0 8px;
  min-height: 52px;
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 100%;
}

.server-item.selected {
  background: #6663B8;
  border-color: var(--astrill-border-selected);
}

.server-item-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  width: 100%;
}

.server-item-flag {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  object-fit: cover;
}

.server-item-title {
  color: var(--astrill-text-muted);
  font-size: 13px;
  text-align: left;
}

.server-item-title.selected { color: #C4C8E7; }

.server-item-signal {
  width: 18px;
  height: 18px;
}

.server-item-signal.selected { opacity: 0.55; }

.server-item-star {
  width: 18px;
  height: 18px;
}

/* Effect item */
.effect-item {
  background: transparent;
  border: 1px solid var(--astrill-border-default);
  border-radius: var(--astrill-radius-item);
  color: var(--astrill-text-muted);
  padding: 10px 12px;
  min-height: 52px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  font-size: 14px;
  margin-bottom: 8px;
}

.effect-item:hover {
  border-color: var(--astrill-border-selected);
}

.effect-item.selected {
  background: #6663B8;
  border-color: var(--astrill-border-selected);
  color: #D8D9F4;
}

/* Effects duration input */
.effects-duration-input {
  background: var(--astrill-input-bg);
  border: 1px solid var(--astrill-input-bg);
  border-radius: var(--astrill-radius-input);
  min-height: 36px;
  text-align: center;
  font-size: 14px;
  color: var(--astrill-input-text);
  outline: none;
  padding: 4px 10px;
  width: 92px;
}

.effects-duration-input:focus {
  border-color: var(--astrill-input-bg);
}

/* Scrollable containers */
.scroll-horizontal {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  display: flex;
  gap: 8px;
  max-height: 120px;
  padding-bottom: 8px;
}

.scroll-horizontal::-webkit-scrollbar { display: none; }

.scroll-vertical {
  overflow-y: auto;
  overflow-x: hidden;
}

.scroll-vertical::-webkit-scrollbar { width: 0; }

/* Overflow indicator */
.overflow-indicator {
  width: 2px;
  background: var(--astrill-border-selected);
  border-radius: 1px;
  flex-shrink: 0;
}

/* Error overlay */
.error-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 10;
}

.error-card {
  background: #F8F9FC;
  border-radius: 12px;
  width: 210px;
  padding: 16px 14px 12px;
  text-align: center;
  margin-top: 206px;
}

.error-title {
  color: #6C7298;
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 8px;
}

.error-desc {
  color: #A0A4BC;
  font-size: 10px;
  margin: 0 0 12px;
  line-height: 1.4;
}

.error-ok-btn {
  background: var(--astrill-green);
  color: white;
  border: none;
  border-radius: 10px;
  height: 40px;
  width: 100%;
  cursor: pointer;
  font-size: 14px;
}

/* Logout prompt */
.logout-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 10;
}

.logout-card {
  background: #F8F9FC;
  border-radius: 12px;
  width: 228px;
  padding: 16px 14px 12px;
  text-align: center;
  margin-top: 206px;
}

.logout-title {
  color: #6C7298;
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 8px;
}

.logout-desc {
  color: #A0A4BC;
  font-size: 11px;
  margin: 0 0 12px;
}

.logout-actions {
  display: grid;
  grid-template-columns: 1fr 10px 1fr;
}

.logout-cancel-btn {
  background: #C8CCE3;
  color: #4D527B;
  border: none;
  border-radius: 10px;
  height: 40px;
  cursor: pointer;
  font-size: 14px;
}

.logout-confirm-btn {
  background: var(--astrill-green);
  color: white;
  border: none;
  border-radius: 10px;
  height: 40px;
  cursor: pointer;
  font-size: 14px;
}

/* Busy / loading */
.busy-text {
  color: #B8BDE8;
  font-size: 13px;
  margin: 50px 0 0 2px;
}
