/* style.css */
:root {
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --primary: #6c5ce7;
  --primary-hover: #5a4bd1;
  --text: #2d3436;
  --text-light: #636e72;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(108, 92, 231, 0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Шапка */
header {
  background: var(--card-bg);
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: inline-block;
}

/* Главная страница */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
}
.hero h1 { font-size: 2.2rem; margin-bottom: 15px; color: var(--text); }
.hero p { font-size: 1.1rem; color: var(--text-light); max-width: 600px; margin: 0 auto; }

.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  padding: 20px 0 60px;
}

.test-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.test-card:hover { 
  transform: translateY(-5px); 
  box-shadow: 0 12px 30px rgba(108, 92, 231, 0.2);
}
.test-card h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--text); }
.test-card p { color: var(--text-light); margin-bottom: 25px; flex-grow: 1; font-size: 0.95rem; }

.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
  width: 100%;
  font-size: 1rem;
}
.btn:hover { background: var(--primary-hover); }

/* Страница теста */
.quiz-wrapper { 
  max-width: 600px; 
  margin: 40px auto; 
  padding: 0 20px; 
  flex-grow: 1;
}
.quiz-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.progress-bar {
  height: 8px;
  background: #dfe6e9;
  border-radius: 4px;
  margin-bottom: 25px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.4s ease;
}

.question-text { font-size: 1.3rem; margin-bottom: 25px; text-align: center; font-weight: 600; }

.options { display: flex; flex-direction: column; gap: 12px; }
.option-btn {
  padding: 16px;
  border: 2px solid #dfe6e9;
  background: #fff;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  color: var(--text);
}
.option-btn:hover { 
  border-color: var(--primary); 
  background: #f8f9ff; 
  transform: translateX(5px);
}

.hidden { display: none !important; }

/* Результат */
.result-block { text-align: center; animation: fadeIn 0.5s ease; padding: 20px 0; }
.result-icon { font-size: 4rem; margin-bottom: 15px; display: block; }
.result-title { font-size: 1.8rem; color: var(--primary); margin-bottom: 15px; }
.result-desc { color: var(--text-light); margin-bottom: 30px; font-size: 1.1rem; line-height: 1.5; }

.share-buttons { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.share-btn {
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  color: white;
  transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.9; }
.vk { background: #0077FF; }
.tg { background: #0088cc; }
.copy { background: #2d3436; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  margin-top: 10px;
}
.btn-outline:hover { background: var(--primary); color: white; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 500px) {
  .hero h1 { font-size: 1.8rem; }
  .quiz-card { padding: 20px; }
  .question-text { font-size: 1.1rem; }
}