:root {
  color-scheme: dark;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #05080f;
  color: #e7f2ff;
  --surface: rgba(10, 20, 40, 0.92);
  --surface-strong: rgba(12, 24, 50, 0.98);
  --glow: #2dc4ff;
  --glow-soft: rgba(45, 196, 255, 0.16);
  --text-muted: #94b5d5;
  --border: rgba(53, 105, 172, 0.22);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(circle at top, rgba(45, 196, 255, 0.14), transparent 28%),
              radial-gradient(circle at bottom right, rgba(25, 110, 255, 0.12), transparent 22%),
              #02050a;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(170deg, rgba(76, 198, 255, 0.04), transparent 40%),
              linear-gradient(to right, rgba(11, 30, 67, 0.72), rgba(5, 10, 20, 0.92));
  pointer-events: none;
}

.browser-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.browser-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(8, 18, 40, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
}

.nav-buttons {
  display: flex;
  gap: 8px;
}

.nav-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: rgba(45, 196, 255, 0.1);
  color: #abe9ff;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
  background: rgba(45, 196, 255, 0.2);
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.url-form {
  flex: 1;
  display: flex;
  gap: 8px;
  max-width: 600px;
}

.url-form input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid rgba(45, 196, 255, 0.24);
  border-radius: 20px;
  background: rgba(8, 18, 35, 0.98);
  color: #eef6ff;
  font-size: 14px;
  outline: none;
  box-shadow: 0 0 20px rgba(45, 196, 255, 0.08);
  transition: border-color 0.25s ease;
}

.url-form input:focus {
  border-color: rgba(45, 196, 255, 0.65);
}

.url-form input::placeholder {
  color: rgba(207, 229, 255, 0.56);
}

.go-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, #2dc4ff, #3c80ff);
  color: #061122;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.go-btn:hover {
  transform: translateY(-1px);
}

#browserFrame {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

/* Main Page Styles */
.main-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-header {
  background: rgba(8, 18, 40, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-ring-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(45, 196, 255, 0.5);
  box-shadow: 0 0 20px rgba(45, 196, 255, 0.28);
}

.logo-section h1 {
  margin: 0;
  font-size: 1.25rem;
  background: linear-gradient(135deg, #2dc4ff, #69d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-nav a {
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  color: #abe9ff;
  background: rgba(45, 196, 255, 0.1);
  border: 1px solid rgba(45, 196, 255, 0.2);
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.header-nav a:hover {
  background: rgba(45, 196, 255, 0.2);
  border-color: rgba(45, 196, 255, 0.4);
}

.download-link {
  background: linear-gradient(135deg, #2dc4ff, #3c80ff) !important;
  color: #061122 !important;
  font-weight: 600;
  border: none !important;
}

.download-link:hover {
  box-shadow: 0 8px 20px rgba(45, 196, 255, 0.25);
  transform: translateY(-2px);
}

.hero {
  max-width: 1200px;
  margin: 60px auto 40px;
  padding: 0 20px;
  text-align: center;
}

.hero-content h2 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin: 0 0 16px;
  background: linear-gradient(135deg, #2dc4ff, #69d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 28px;
}

.cta-btn {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, #2dc4ff, #3c80ff);
  color: #061122;
  border: none;
  border-radius: 24px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(45, 196, 255, 0.25);
}

.try-proxy {
  max-width: 800px;
  margin: 40px auto;
  padding: 40px 20px;
}

.proxy-input-card {
  background: rgba(8, 18, 35, 0.87);
  border: 1px solid rgba(45, 196, 255, 0.18);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
}

.proxy-input-card h3 {
  margin-top: 0;
  font-size: 1.25rem;
  color: #d9f2ff;
}

.proxy-form {
  display: flex;
  gap: 8px;
  margin: 20px 0;
}

.proxy-form input {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid rgba(45, 196, 255, 0.24);
  border-radius: 20px;
  background: rgba(8, 18, 35, 0.98);
  color: #eef6ff;
  font-size: 0.95rem;
  outline: none;
}

.proxy-form input:focus {
  border-color: rgba(45, 196, 255, 0.65);
}

.proxy-form input::placeholder {
  color: rgba(207, 229, 255, 0.56);
}

.proxy-submit-btn {
  padding: 12px 28px;
  background: linear-gradient(135deg, #2dc4ff, #3c80ff);
  color: #061122;
  border: none;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.proxy-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(45, 196, 255, 0.2);
}

.proxy-hint {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.features {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #2dc4ff, #69d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: rgba(8, 18, 35, 0.87);
  border: 1px solid rgba(45, 196, 255, 0.12);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  transition: all 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(45, 196, 255, 0.3);
  box-shadow: 0 12px 32px rgba(45, 196, 255, 0.1);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  margin: 12px 0;
  font-size: 1.25rem;
  color: #d9f2ff;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.about {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
}

.about-container {
  background: rgba(8, 18, 35, 0.87);
  border: 1px solid rgba(45, 196, 255, 0.12);
  border-radius: 16px;
  padding: 40px;
}

.about h2 {
  font-size: 1.8rem;
  margin-top: 0;
  color: #d9f2ff;
}

.about p {
  color: var(--text-muted);
  line-height: 1.8;
}

.about-list {
  margin: 20px 0;
  padding-left: 20px;
  color: var(--text-muted);
}

.about-list li {
  margin-bottom: 8px;
  color: #abe9ff;
}

.cta-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 40px 20px;
  text-align: center;
  background: rgba(45, 196, 255, 0.08);
  border-radius: 16px;
}

.cta-section h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
  color: #d9f2ff;
}

.cta-section p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.cta-download-btn {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, #2dc4ff, #3c80ff);
  color: #061122;
  border: none;
  border-radius: 24px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cta-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(45, 196, 255, 0.25);
}

.main-footer {
  margin-top: 60px;
  padding: 24px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  border-top: 1px solid var(--border);
}

/* Platform Download Page Styles */
.platform-download {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.download-header {
  max-width: 900px;
  margin: 40px auto;
  text-align: center;
  padding: 20px 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #abe9ff;
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid rgba(45, 196, 255, 0.2);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.back-link:hover {
  background: rgba(45, 196, 255, 0.1);
  border-color: rgba(45, 196, 255, 0.4);
}

.download-header h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin: 16px 0 8px;
  background: linear-gradient(135deg, #2dc4ff, #69d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.download-header p {
  color: var(--text-muted);
  margin: 0;
  font-size: 1.1rem;
}

.download-content {
  max-width: 900px;
  margin: 0 auto 40px;
  flex: 1;
}

.system-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.info-card {
  background: rgba(8, 18, 35, 0.87);
  border: 1px solid rgba(45, 196, 255, 0.12);
  border-radius: 12px;
  padding: 24px;
}

.info-card h3 {
  margin-top: 0;
  color: #d9f2ff;
  margin-bottom: 16px;
}

.info-card ul,
.info-card ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
}

.info-card li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.download-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px;
  background: rgba(8, 18, 35, 0.87);
  border: 1px solid rgba(45, 196, 255, 0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.download-btn:hover {
  background: rgba(8, 18, 35, 0.95);
  border-color: rgba(45, 196, 255, 0.3);
  transform: translateX(4px);
}

.download-btn.primary {
  background: linear-gradient(135deg, rgba(45, 196, 255, 0.15), rgba(60, 128, 255, 0.1));
  border-color: rgba(45, 196, 255, 0.25);
}

.download-btn.primary:hover {
  background: linear-gradient(135deg, rgba(45, 196, 255, 0.25), rgba(60, 128, 255, 0.15));
}

.btn-label {
  color: #d9f2ff;
  font-weight: 600;
  font-size: 1rem;
}

.btn-size {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.features-list {
  background: rgba(45, 196, 255, 0.08);
  border: 1px solid rgba(45, 196, 255, 0.12);
  border-radius: 12px;
  padding: 24px;
}

.features-list h3 {
  margin-top: 0;
  color: #d9f2ff;
}

.features-list ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: var(--text-muted);
}

.features-list li {
  padding: 8px 0;
  line-height: 1.6;
  color: #abe9ff;
}

.download-footer {
  max-width: 900px;
  margin: 40px auto 0;
  padding: 20px 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  border-top: 1px solid var(--border);
}

.download-footer a {
  color: #abe9ff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.download-footer a:hover {
  color: #2dc4ff;
}

.overlay-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  width: min(340px, calc(100vw - 40px));
  border-radius: 26px;
  background: rgba(20, 25, 40, 0.95);
  border: 1px solid rgba(45, 196, 255, 0.18);
  box-shadow: 0 32px 80px rgba(19, 97, 200, 0.18);
  backdrop-filter: blur(24px);
  z-index: 99999;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.overlay-panel:active {
  cursor: grabbing;
}

.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: #d9f2ff;
}

.drag-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.overlay-content {
  padding: 20px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row span {
  color: var(--text-muted);
}

.stat-row strong {
  color: #f5fbff;
  font-size: 0.96rem;
}

.overlay-footer {
  padding: 16px 20px 20px;
}

#resetButton {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 14px;
  background: rgba(45, 196, 255, 0.15);
  color: #d7f3ff;
  cursor: pointer;
  transition: background 0.25s ease;
}

#resetButton:hover {
  background: rgba(45, 196, 255, 0.26);
}

/* Responsive Design */
@media (max-width: 768px) {
  .browser-toolbar {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }

  .nav-buttons {
    order: 1;
    justify-content: center;
  }

  .url-form {
    order: 2;
    width: 100%;
    max-width: none;
  }

  .overlay-panel {
    top: auto;
    bottom: 20px;
    right: 20px;
    left: 20px;
    width: auto;
  }
}

@media (max-width: 480px) {
  .browser-toolbar {
    padding: 8px 12px;
  }

  .nav-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .url-form input {
    font-size: 13px;
    padding: 8px 12px;
  }

  .go-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* Download Page Styles */
.download-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: inherit;
}

.download-header {
  text-align: center;
  margin-bottom: 60px;
}

.download-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 16px;
  background: linear-gradient(135deg, #2dc4ff, #69d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.download-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

.download-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 900px;
  width: 100%;
  margin-bottom: 60px;
}

.platform-btn {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(8, 18, 35, 0.87);
  color: #e7f2ff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-align: left;
}

.platform-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(45, 196, 255, 0.15);
  border-color: rgba(45, 196, 255, 0.3);
}

.platform-icon {
  font-size: 2rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(45, 196, 255, 0.1);
}

.platform-info h3 {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.platform-info p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.back-section {
  text-align: center;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid rgba(45, 196, 255, 0.3);
  border-radius: 24px;
  background: rgba(45, 196, 255, 0.1);
  color: #abe9ff;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}

.back-btn:hover {
  background: rgba(45, 196, 255, 0.2);
  transform: translateY(-2px);
}

@media (max-width: 860px) {
  .section-glow {
    grid-template-columns: 1fr;
  }

  .about-section {
    grid-template-columns: 1fr;
  }

  .download-section {
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .hero-panel {
    padding: 22px;
  }

  .proxy-form input,
  .proxy-form button,
  .download-btn {
    width: 100%;
  }

  .overlay-panel {
    right: 16px;
    top: 24px;
  }
}
