:root {
  --bg: #0b1020;
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.70);
  --primary: #007aff;
  --primary-glow: rgba(0, 122, 255, 0.4);
  --danger: #ff2d55;
  --warning: #ffbf47;
  --success: #4cd964;
  --panel: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);
  --radius: 16px;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[lang="zh"] { --font-main: "Noto Sans SC", sans-serif; }
html[lang="ja"] { --font-main: "Noto Sans JP", sans-serif; }
html[lang="ko"] { --font-main: "Noto Sans KR", sans-serif; }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background effects */
body::before {
  content: "";
  position: fixed;
  inset: -40%;
  pointer-events: none;
  background: conic-gradient(from 180deg at 50% 50%, rgba(88, 166, 255, 0.1), rgba(255, 91, 110, 0.1), rgba(255, 191, 71, 0.08), rgba(88, 166, 255, 0.1));
  filter: blur(100px);
  z-index: -1;
  animation: bgRotate 30s linear infinite;
}

@keyframes bgRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #fff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  font-weight: 500;
}

.nav-links a:hover {
  color: #fff;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: #0b1020;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
  color: #0b1020;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--panel);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 100px 0 60px;
}

.hero h1 {
  font-size: 64px;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  background: linear-gradient(to right, #fff, var(--muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 20px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* Features Matrix */
.features {
  padding: 80px 0;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.matrix-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  transition: transform 0.3s ease;
}

.matrix-card:hover {
  transform: translateY(-5px);
}

.matrix-card.do { border-top: 4px solid var(--danger); }
.matrix-card.schedule { border-top: 4px solid var(--success); }
.matrix-card.delegate { border-top: 4px solid var(--primary); }
.matrix-card.delete { border-top: 4px solid #8e8e93; }

.matrix-card h3 {
  font-size: 24px;
  margin-top: 0;
  margin-bottom: 16px;
}

.matrix-card p {
  color: var(--muted);
  margin: 0;
}

/* Blog List */
.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
  padding: 40px 0 80px;
}

.blog-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.blog-card h3 {
  margin-top: 0;
  font-size: 20px;
  margin-bottom: 16px;
}

.blog-card p {
  color: var(--muted);
  flex-grow: 1;
}

.blog-card .read-more {
  margin-top: 24px;
  font-weight: 600;
  color: var(--primary);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 80px;
  text-align: center;
  color: var(--muted);
}

/* Language Switcher */
.lang-switcher {
  position: relative;
}

.btn-lang {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-lang:hover {
  background: var(--panel);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1a2030;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* RTL Support for dropdown */
[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

.lang-dropdown.active {
  display: flex;
}

.lang-dropdown button,
.lang-dropdown a {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 8px 12px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  display: block;
  width: 100%;
}

[dir="rtl"] .lang-dropdown button,
[dir="rtl"] .lang-dropdown a {
  text-align: right;
}

.lang-dropdown button:hover,
.lang-dropdown a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.lang-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
  opacity: 0.5;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 48px; }
  .matrix-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; }
  .nav-links a:not(.btn) { display: none; }
}

/* Contact Form Styling */
.contact-section {
  padding: 60px 0 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  text-align: left;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 16px;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(255, 255, 255, 0.06);
}

textarea.form-input {
  min-height: 150px;
  resize: vertical;
}

.form-feedback {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: none;
  text-align: left;
}

.form-feedback.success {
  background: rgba(76, 217, 100, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
}

.form-feedback.error {
  background: rgba(255, 45, 85, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: #0b1020;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

