:root {
  --bg-gradient-dark: linear-gradient(-45deg, #0f0f0f, #1a1a1a, #0f0f0f, #1a1a1a);
  --bg-gradient-light: linear-gradient(-45deg, #f8f9fa, #f1f3f5, #f8fafc, #f1f5f9);
  --text-color-dark: #ffffff;
  --text-color-light: #334155;
  --card-bg-dark: rgba(255, 255, 255, 0.05);
  --card-bg-light: rgba(255, 255, 255, 0.95);
  --button-bg-dark: rgba(255, 255, 255, 0.03);
  --button-bg-light: #f1f5ff;
  --button-color-dark: #ffffff;
  --button-color-light: #2563eb;
  --button-border-light: rgba(37, 99, 235, 0.1);
  --status-color-dark: #00ff66;
  --status-color-light: #10b981;
  --telegram-color-dark: #0088cc;
  --telegram-color-light: #229ED9;
  --github-color-dark: #6e5494;
  --github-color-light: #6e5494;
  --hacker-green: #00ff41;
  --terminal-bg-light: #f8fafc;
  --terminal-border-light: #e2e8f0;
  --terminal-text-light: #334155;
  --terminal-output-light: #64748b;
}

/* Увеличенный базовый размер */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Roboto', sans-serif;
  transition: background 0.8s ease, color 0.5s ease;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  font-size: 18px; /* Увеличенный базовый размер шрифта */
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
  display: none;
}

body.dark {
  background: var(--bg-gradient-dark);
  color: var(--text-color-dark);
}

body.light {
  background: var(--bg-gradient-light);
  color: var(--text-color-light);
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body {
  background-size: 300% 300%;
  animation: gradientShift 18s ease infinite;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  justify-content: flex-start;
}

.main-container {
  display: flex;
  gap: 40px; /* Увеличенный отступ между карточками */
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 24px 0 24px; /* Увеличенные отступы */
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px; /* Увеличенная максимальная ширина */
}

.card {
  padding: 30px; /* Увеличенные внутренние отступы */
  border-radius: 28px; /* Больше скругление углов */
  background: var(--card-bg-dark);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  user-select: none;
  transition: all 0.5s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 320px; /* Увеличенная минимальная ширина */
  max-width: 480px; /* Увеличенная максимальная ширина */
  flex: 1 1 360px; /* Увеличенный базовый размер */
}

body.light .card {
  background: var(--card-bg-light);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--terminal-border-light);
}

.profile-card {
  max-width: 360px; /* Увеличенная ширина */
  align-items: center;
}

.profile-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px; /* Увеличенный отступ */
  margin-bottom: 25px; /* Увеличенный отступ */
  text-align: center;
}

.avatar {
  width: 110px; /* Увеличенный размер */
  height: 110px;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  object-fit: cover;
  transition: transform 0.3s ease;
}

.avatar:hover { transform: scale(1.05); }

.profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.username {
  font-size: 28px; /* Увеличенный размер */
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkmark {
  width: 20px; /* Увеличенный размер */
  height: 20px;
  margin-left: 8px; /* Увеличенный отступ */
}

body.light .checkmark { filter: brightness(0.7); }

.handle {
  font-size: 18px; /* Увеличенный размер */
  margin-top: 8px; /* Увеличенный отступ */
  opacity: 0.8;
}

.status {
  font-size: 18px; /* Увеличенный размер */
  color: var(--status-color-dark);
  margin-top: 8px; /* Увеличенный отступ */
  display: flex;
  align-items: center;
  justify-content: center;
}

body.light .status { color: var(--status-color-light); }

.status::before {
  content: '';
  display: inline-block;
  width: 10px; /* Увеличенный размер */
  height: 10px;
  border-radius: 50%;
  background-color: currentColor;
  margin-right: 8px; /* Увеличенный отступ */
}

.skills {
  margin-top: 25px; /* Увеличенный отступ */
  width: 100%;
}

.skills-title {
  font-size: 18px; /* Увеличенный размер */
  margin-bottom: 12px; /* Увеличенный отступ */
  text-align: center;
  opacity: 0.8;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px; /* Увеличенный отступ */
}

.skill-tag {
  padding: 6px 14px; /* Увеличенные отступы */
  border-radius: 20px;
  font-size: 14px; /* Увеличенный размер */
  font-weight: bold;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

body.light .skill-tag {
  background: rgba(37, 99, 235, 0.08);
  color: var(--button-color-light);
}

.skill-tag:hover { transform: scale(1.05); }

.profile-telegram-btn, .profile-github-btn {
  padding: 12px 24px; /* Увеличенные отступы */
  border-radius: 12px;
  font-weight: bold;
  font-size: 16px; /* Увеличенный размер */
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px; /* Увеличенный отступ */
  transition: all 0.3s ease;
  width: 180px; /* Увеличенная ширина */
  margin: 15px auto 0 auto; /* Увеличенный отступ */
}

body.dark .profile-telegram-btn {
  background: var(--telegram-color-dark);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.2);
}

body.light .profile-telegram-btn {
  background: var(--telegram-color-light);
  color: white;
  box-shadow: 0 4px 12px rgba(34, 158, 217, 0.2);
}

.profile-telegram-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 136, 204, 0.3);
}

body.dark .profile-github-btn {
  background: var(--github-color-dark);
  color: white;
  box-shadow: 0 4px 12px rgba(110, 84, 148, 0.2);
}

body.light .profile-github-btn {
  background: var(--github-color-light);
  color: white;
  box-shadow: 0 4px 12px rgba(110, 84, 148, 0.2);
}

.profile-github-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(110, 84, 148, 0.3);
}

.telegram-icon, .github-icon {
  width: 18px; /* Увеличенный размер */
  height: 18px;
}

.theme-toggle {
  position: fixed;
  top: 25px; /* Увеличенный отступ */
  right: 25px;
  padding: 12px 24px; /* Увеличенные отступы */
  border-radius: 20px;
  font-weight: bold;
  font-size: 16px; /* Увеличенный размер */
  cursor: pointer;
  background: var(--button-bg-dark);
  color: var(--button-color-dark);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  z-index: 10;
}

body.light .theme-toggle {
  background: var(--button-bg-light);
  color: var(--button-color-light);
  border: 1px solid var(--button-border-light);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

body.light .theme-toggle:hover {
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.15);
}

.visitor-counter {
  position: fixed;
  bottom: 25px; /* Увеличенный отступ */
  right: 25px;
  padding: 10px 18px; /* Увеличенные отступы */
  border-radius: 20px;
  font-size: 14px; /* Увеличенный размер */
  background: var(--button-bg-dark);
  color: var(--button-color-dark);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  z-index: 10;
}

body.light .visitor-counter {
  background: var(--button-bg-light);
  color: var(--button-color-light);
  border: 1px solid var(--button-border-light);
}

.content-card {
  min-width: 360px; /* Увеличенная минимальная ширина */
  max-width: 560px; /* Увеличенная максимальная ширина */
  flex: 2 1 450px; /* Увеличенный базовый размер */
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.content-card h2 {
  font-size: 28px; /* Увеличенный размер */
  margin: 0 auto 20px auto; /* Увеличенный отступ */
  text-align: center;
}

.terminal {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 14px; /* Больше скругление */
  padding: 20px; /* Увеличенные отступы */
  font-family: 'Source Code Pro', monospace;
  font-size: 16px; /* Увеличенный размер шрифта */
  margin: 20px 0; /* Увеличенные отступы */
  border: 1px solid rgba(0, 255, 65, 0.2);
  height: 280px; /* Увеличенная высота */
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.1);
}

body.light .terminal {
  background: var(--terminal-bg-light);
  border: 1px solid var(--terminal-border-light);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

.terminal-line {
  margin: 6px 0; /* Увеличенный отступ */
  line-height: 1.5; /* Увеличенный межстрочный интервал */
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-prompt { color: var(--hacker-green); }
.terminal-command { color: #ffffff; }
body.light .terminal-command { color: var(--terminal-text-light); }
.terminal-output { color: #aaaaaa; }
body.light .terminal-output { color: var(--terminal-output-light); }

.terminal-cursor {
  display: inline-block;
  width: 12px; /* Увеличенный размер */
  background: none;
  color: var(--hacker-green);
  animation: blink-cursor 1s steps(2, start) infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px; /* Увеличенный отступ */
  margin-top: 25px; /* Увеличенный отступ */
}

.buttons a {
  padding: 14px 18px; /* Увеличенные отступы */
  border-radius: 14px; /* Больше скругление */
  font-weight: 700;
  font-size: 16px; /* Увеличенный размер */
  text-decoration: none;
  color: var(--button-color-dark);
  background: var(--button-bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  text-align: center;
}

body.light .buttons a {
  color: var(--button-color-light);
  background: var(--button-bg-light);
  border: 1px solid var(--button-border-light);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
}

.buttons a:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

body.light .buttons a:hover {
  background: #e3ebff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
}

.secret-btn {
  position: relative;
  overflow: hidden;
  grid-column: span 2;
}

.secret-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
          to bottom right,
          rgba(255, 255, 255, 0) 45%,
          rgba(255, 255, 255, 0.8) 50%,
          rgba(255, 255, 255, 0) 55%
  );
  transform: rotate(30deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  20% { left: 100%; }
  100% { left: 100%; }
}

.projects-section {
  margin-top: 40px; /* Увеличенный отступ */
  width: 100%;
  max-width: 1200px; /* Увеличенная максимальная ширина */
  padding: 0 24px; /* Увеличенные отступы */
  margin-bottom: 100px; /* Увеличенный отступ */
}

.projects-title {
  font-size: 28px; /* Увеличенный размер */
  text-align: center;
  margin-bottom: 25px; /* Увеличенный отступ */
}

.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* Увеличенная минимальная ширина */
  gap: 24px; /* Увеличенный отступ */
}

.project-card {
  padding: 24px; /* Увеличенные отступы */
  border-radius: 18px; /* Больше скругление */
  background: var(--card-bg-dark);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light .project-card {
  background: var(--card-bg-light);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--terminal-border-light);
}

.project-card h3 {
  margin-top: 0;
  margin-bottom: 12px; /* Увеличенный отступ */
  font-size: 20px; /* Увеличенный размер */
}

.project-card p {
  margin-bottom: 18px; /* Увеличенный отступ */
  font-size: 16px; /* Увеличенный размер */
  opacity: 0.9;
}

.project-link {
  display: inline-block;
  padding: 10px 18px; /* Увеличенные отступы */
  border-radius: 10px; /* Больше скругление */
  background: rgba(255, 255, 255, 0.1);
  color: var(--button-color-dark);
  text-decoration: none;
  font-size: 16px; /* Увеличенный размер */
  transition: all 0.3s ease;
}

body.light .project-link {
  background: rgba(37, 99, 235, 0.08);
  color: var(--button-color-light);
}

.project-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

body.light .project-link:hover {
  background: rgba(37, 99, 235, 0.15);
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

.terminal::-webkit-scrollbar {
  width: 10px; /* Увеличенная ширина */
}

.terminal::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 5px; /* Больше скругление */
}

body.light .terminal::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

.terminal::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 65, 0.3);
  border-radius: 5px; /* Больше скругление */
}

body.light .terminal::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.3);
}

.terminal::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 65, 0.5);
}

body.light .terminal::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.5);
}

.floating-menu-container {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
}

/* КНОПКА (☰) */
.tablet-button {
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--button-bg-dark);
  color: var(--button-color-dark);
  border-radius: 27px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-family: system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.light .tablet-button {
  background: var(--button-bg-light);
  color: var(--button-color-light);
  border: 1px solid var(--button-border-light);
}

.tablet-button:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

/* МЕНЮ */
.tablet-menu {
  position: absolute;
  top: 60px;
  left: 0;
  display: none;
  flex-direction: column;
  background: var(--card-bg-dark);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 101;
  gap: 12px;
  width: 280px;
  animation: fadeIn 0.2s ease-out;
}

body.light .tablet-menu {
  background: var(--card-bg-light);
  border: 1px solid var(--button-border-light);
}

/* ПУНКТЫ МЕНЮ */
.tablet-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-family: system-ui, sans-serif;
  text-decoration: none;
  color: var(--button-color-dark);
  background: transparent;
  transition: background 0.15s ease, transform 0.15s ease;
}

body.light .tablet-menu a {
  color: var(--button-color-light);
}

.tablet-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

/* ИКОНКИ */
.tablet-menu .icon {
  font-size: 17px;
  width: 22px;
  text-align: center;
}

/* ГЛАВНАЯ */
.tablet-menu a.home:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ПАРОЛИ */
.tablet-menu a.password {
  background: rgba(45, 212, 191, 0.15);
  color: #0f766e;
}
.tablet-menu a.password:hover {
  background: rgba(45, 212, 191, 0.25);
}

/* ARCH */
.tablet-menu a.arch {
  background: rgba(37, 99, 235, 0.15);
  color: #1d4ed8;
}
.tablet-menu a.arch:hover {
  background: rgba(37, 99, 235, 0.25);
}

.tablet-menu a.anime {
  background: rgba(249, 168, 212, 0.15);
  color: #be185d;
}
.tablet-menu a.anime:hover {
  background: rgba(249, 168, 212, 0.25);
}

/* АНИМАЦИЯ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
