:root {
  --violet: #a020f0;
  --blue: #1e90ff;
  --cyan: #00f2fe;
  --dark: #050510;
  --darker: #020208;
  --text: #eaf0ff;
  --text-dim: #a0a8c0;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --success: #00ff9d;
  --error: #ff4757;
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0;
}

body {
  font-family: "Rajdhani", sans-serif;
  background: var(--darker);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(160, 32, 240, 0.15) 0%, transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(30, 144, 255, 0.15) 0%, transparent 30%);
  pointer-events: none;
  z-index: -1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--dark);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--violet), var(--blue));
  border-radius: 4px;
}

/* Header */
header.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 5%;
  background: rgba(5, 5, 16, 0.9);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 0 30px rgba(30, 144, 255, 0.1);
  transition: all 0.3s ease;
}

header.header.scrolled {
  padding: 10px 5%;
  background: rgba(2, 2, 8, 0.95);
}

.logo { 
  font-family: "Orbitron"; 
  font-size: 1.5rem; 
  font-weight: 700;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.nav a, .nav button {
  margin-left: 24px; 
  color: var(--text); 
  text-decoration: none;
  background: none; 
  border: none; 
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  transition: width 0.3s ease;
}

.nav a:hover::after {
  width: 100%;
}

.nav button {
  background: linear-gradient(90deg, var(--violet), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.2rem;
}

.nav a:hover, .nav button:hover {
  color: var(--cyan);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: 20px;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: rgba(5, 5, 16, 0.95);
  backdrop-filter: blur(12px);
  z-index: 999;
  padding: 20px;
  flex-direction: column;
  gap: 15px;
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.mobile-menu a, .mobile-menu button {
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 10px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.mobile-menu a:hover, .mobile-menu button:hover {
  background: rgba(160, 32, 240, 0.2);
}

.mobile-menu button {
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 10%;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(160, 32, 240, 0.2) 0%, transparent 60%);
  z-index: -1;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(30, 144, 255, 0.2) 0%, transparent 60%);
  z-index: -1;
}

.hero h1 {
  font-size: 4rem;
  font-family: "Orbitron";
  font-weight: 700;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(160, 32, 240, 0.3);
  margin-bottom: 20px;
  line-height: 1.2;
  animation: glow 3s ease-in-out infinite alternate;
}

.hero p {
  margin: 14px 0 30px;
  font-size: 1.3rem;
  color: var(--text-dim);
  max-width: 600px;
  animation: fadeUp 1.5s ease;
}

.hero-actions {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  animation: fadeUp 2s ease;
}

.btn {
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn i {
  font-size: 1.1rem;
}

.btn.primary {
  background: linear-gradient(135deg, var(--violet), var(--blue));
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(160, 32, 240, 0.3);
}

.btn.ghost {
  border: 1px solid var(--violet);
  color: var(--violet);
  background: rgba(160, 32, 240, 0.1);
}

.btn.primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.btn.primary:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(160, 32, 240, 0.5);
}

/* Sections */
.section {
  padding: 100px 10%;
  position: relative;
}

.section:nth-child(even) {
  background: rgba(5, 5, 16, 0.5);
}

.section h2 {
  text-align: center;
  font-family: "Orbitron";
  font-size: 2.5rem;
  margin-bottom: 60px;
  color: var(--text);
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  border-radius: 3px;
}

/* Portfolio Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s ease;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(160, 32, 240, 0.1), rgba(30, 144, 255, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.card-content {
  padding: 20px;
}

.card h3 {
  color: var(--text);
  margin-bottom: 10px;
  font-size: 1.3rem;
  font-weight: 600;
}

.card p {
  color: var(--text-dim);
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.project-link {
  color: var(--cyan);
  text-decoration: none;
  word-break: break-all;
  display: inline-block;
  margin: 10px 0;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.project-link:hover {
  color: var(--violet);
  border-bottom-color: var(--violet);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.tag {
  padding: 4px 10px;
  background: rgba(30, 144, 255, 0.15);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--cyan);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(30, 144, 255, 0.3);
  border-color: rgba(30, 144, 255, 0.3);
}

.card:hover .card-img {
  transform: scale(1.05);
}

/* About Section */
.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
  max-width: 1100px;
  margin: 0 auto;
}

.about-img {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--glass);
  box-shadow: 0 0 30px rgba(160, 32, 240, 0.3);
  flex-shrink: 0;
}

.about-text {
  flex: 1;
}

.about-text p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-dim);
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

.skill {
  padding: 12px 20px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill i {
  color: var(--cyan);
  font-size: 1.1rem;
}

.skill:hover {
  background: rgba(30, 144, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(30, 144, 255, 0.2);
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(5, 5, 16, 0.5);
  color: var(--text);
  font-family: "Rajdhani", sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.submit-btn {
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
  margin-top: 10px;
}

/* Social Links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.social-link {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-size: 1.3rem;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: linear-gradient(135deg, var(--violet), var(--blue));
  color: #fff;
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(30, 144, 255, 0.3);
}

/* Footer */
footer.footer {
  text-align: center;
  padding: 30px;
  background: rgba(2, 2, 8, 0.8);
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo {
  font-family: "Orbitron";
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
}

.footer-link {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--cyan);
}

.copyright {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Assistant */
.assistant {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 380px;
  max-width: 90vw;
  height: 500px;
  max-height: 70vh;
  background: rgba(5, 5, 16, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  display: none;
  flex-direction: column;
  font-size: 0.95rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  overflow: hidden;
  animation: fadeIn 0.5s ease;
}

.assistant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  color: #fff;
  font-weight: 600;
}

.assistant-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.assistant-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  padding: 5px;
}

.assistant-clear {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  padding: 5px;
  font-size: 0.9rem;
}

.assistant-clear:hover {
  opacity: 1;
}

.assistant-close:hover {
  transform: rotate(90deg);
}

.assistant-body {
  padding: 15px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  padding: 12px 15px;
  border-radius: 12px;
  max-width: 85%;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}

.msg.bot {
  background: rgba(30, 144, 255, 0.15);
  align-self: flex-start;
  border-bottom-left-radius: 5px;
}

.msg.user {
  background: rgba(160, 32, 240, 0.15);
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}

.msg-content {
  margin-bottom: 8px;
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quick-reply {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text);
}

.quick-reply:hover {
  background: rgba(30, 144, 255, 0.2);
  transform: translateY(-2px);
}

.assistant-input {
  display: flex;
  border-top: 1px solid var(--glass-border);
  padding: 10px;
  background: rgba(2, 2, 8, 0.8);
}

.assistant-input input {
  flex: 1;
  border: none;
  background: var(--glass);
  padding: 12px 15px;
  color: var(--text);
  border-radius: 8px;
  font-family: "Rajdhani", sans-serif;
}

.assistant-input input:focus {
  outline: none;
  border-color: var(--blue);
}

.assistant-send {
  background: linear-gradient(135deg, var(--violet), var(--blue));
  border: none;
  color: #fff;
  padding: 0 15px;
  cursor: pointer;
  border-radius: 8px;
  margin-left: 10px;
  transition: all 0.3s ease;
}

.assistant-send:hover {
  transform: scale(1.05);
}

.typing {
  animation: pulse 1.5s infinite;
}

/* Floating Particles */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: absolute;
  background: rgba(160, 32, 240, 0.5);
  border-radius: 50%;
  filter: blur(1px);
  animation: float linear infinite;
}

/* Animations */
@keyframes glow {
  from { text-shadow: 0 0 10px var(--violet), 0 0 20px var(--blue); }
  to { text-shadow: 0 0 20px var(--blue), 0 0 40px var(--violet); }
}

@keyframes fadeIn { 
  from { opacity: 0; transform: translateY(20px); } 
  to { opacity: 1; transform: translateY(0); } 
}

@keyframes fadeUp { 
  from { opacity: 0; transform: translateY(30px); } 
  to { opacity: 1; transform: translateY(0); } 
}

@keyframes float {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 3.2rem;
  }
  
  .about-content {
    flex-direction: column;
    text-align: center;
  }
  
  .about-img {
    margin-bottom: 30px;
  }
  
  .section {
    padding: 80px 5%;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 0 5%;
    text-align: center;
    align-items: center;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .section h2 {
    font-size: 2rem;
  }
  
  .nav a {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .about-img {
    width: 250px;
    height: 250px;
  }
  
  .skills {
    justify-content: center;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .card {
    margin: 0 10px;
  }
  
  .assistant {
    width: 90%;
    right: 5%;
    bottom: 20px;
    height: 400px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
    line-height: 1.3;
  }
  
  .hero p {
    font-size: 1rem;
    margin: 10px 0 20px;
  }
  
  .section {
    padding: 60px 5%;
  }
  
  .section h2 {
    font-size: 1.8rem;
    margin-bottom: 40px;
  }
  
  .about-img {
    width: 200px;
    height: 200px;
  }
  
  .skill {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  
  .contact-form {
    padding: 20px;
  }
  
  .form-control {
    padding: 10px 12px;
  }
  
  .social-links {
    gap: 15px;
  }
  
  .social-link {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 10px;
  }
  
  .assistant {
    height: 350px;
    bottom: 15px;
  }
  
  .assistant-header {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .msg {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .quick-replies {
    gap: 6px;
  }
  
  .quick-reply {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
}

/* Mobile-specific improvements */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    height: auto;
    padding-top: 120px;
    padding-bottom: 80px;
  }
  
  .assistant {
    height: 300px;
  }
}

/* Touch device improvements */
@media (hover: none) {
  .card:hover {
    transform: none;
  }
  
  .skill:hover {
    transform: none;
  }
  
  .social-link:hover {
    transform: none;
  }
  
  .btn:hover {
    transform: none;
  }
}

/* High-density screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo {
    font-weight: 800;
  }
  
  .btn {
    font-weight: 700;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hero h1 {
    animation: none;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background: var(--darker);
    color: var(--text);
  }
}

/* Плавные переходы между секциями */
html {
  scroll-behavior: smooth;
}

.section {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Анимация для hero-секции */
.hero h1 {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  animation-delay: 0.2s;
}

.hero p {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  animation-delay: 0.4s;
}

.hero-actions {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  animation-delay: 0.6s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  z-index: 10000;
  animation: slideIn 0.3s ease;
  max-width: 400px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
}

.notification.error {
  background: var(--error);
}

.notification button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  margin-left: 10px;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
/* Стили для анонимного сообщения */
#anonymous-message-btn {
    margin-top: 10px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--darker);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, var(--violet), var(--blue));
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: white;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin-bottom: 15px;
    color: var(--text-dim);
}

.modal-body textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(5, 5, 16, 0.5);
    color: var(--text);
    font-family: "Rajdhani", sans-serif;
    resize: vertical;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Стили для быстрых ответов ассистента */
.quick-replies-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--glass-border);
}

.quick-reply {
    background: rgba(30, 144, 255, 0.15);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 8px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text);
}

.quick-reply:hover {
    background: rgba(30, 144, 255, 0.3);
    transform: translateY(-2px);
}

/* Анимация печатания */
.typing-animation {
    display: flex;
    align-items: center;
    height: 20px;
}

.typing-animation span {
    height: 8px;
    width: 8px;
    background: var(--cyan);
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    opacity: 0.6;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-animation span:nth-child(1) {
    animation-delay: 0s;
}

.typing-animation span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-animation span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

/* Аватары сообщений */
.msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    flex-shrink: 0;
}

.msg.user .msg-avatar {
    order: 2;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.msg {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.msg-content {
    background: rgba(30, 144, 255, 0.15);
    padding: 12px 15px;
    border-radius: 12px;
    max-width: 80%;
    line-height: 1.5;
}

.msg.user .msg-content {
    background: rgba(160, 32, 240, 0.15);
}

/* Адаптивность для модального окна */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .quick-replies-container {
        flex-direction: column;
    }
}
/* Assistant Styles */
.assistant {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 380px;
    max-width: 90vw;
    height: 500px;
    max-height: 70vh;
    background: rgba(5, 5, 16, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    display: none;
    flex-direction: column;
    font-size: 0.95rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    overflow: hidden;
}

.assistant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(90deg, var(--violet), var(--blue));
    color: #fff;
    font-weight: 600;
    cursor: move;
}

.assistant-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.assistant-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 5px;
}

.assistant-clear {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    padding: 5px;
    font-size: 0.9rem;
}

.assistant-clear:hover {
    opacity: 1;
}

.assistant-close:hover {
    transform: rotate(90deg);
}

.assistant-body {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg {
    padding: 12px 15px;
    border-radius: 12px;
    max-width: 85%;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.msg.bot {
    background: rgba(30, 144, 255, 0.15);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.msg.user {
    background: rgba(160, 32, 240, 0.15);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.msg-content {
    margin-bottom: 8px;
}

.quick-replies-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--glass-border);
    background: rgba(2, 2, 8, 0.8);
}

.quick-reply {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text);
}

.quick-reply:hover {
    background: rgba(30, 144, 255, 0.2);
    transform: translateY(-2px);
}

.assistant-input {
    display: flex;
    border-top: 1px solid var(--glass-border);
    padding: 10px;
    background: rgba(2, 2, 8, 0.8);
}

.assistant-input input {
    flex: 1;
    border: none;
    background: var(--glass);
    padding: 12px 15px;
    color: var(--text);
    border-radius: 8px;
    font-family: "Rajdhani", sans-serif;
}

.assistant-input input:focus {
    outline: none;
    border-color: var(--blue);
}

.assistant-send {
    background: linear-gradient(135deg, var(--violet), var(--blue));
    border: none;
    color: #fff;
    padding: 0 15px;
    cursor: pointer;
    border-radius: 8px;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.assistant-send:hover {
    transform: scale(1.05);
}

.typing {
    display: flex;
    align-items: center;
    padding: 10px 15px;
}

.typing-animation {
    display: flex;
    align-items: center;
    height: 20px;
}

.typing-animation span {
    height: 8px;
    width: 8px;
    background: var(--cyan);
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    opacity: 0.6;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-animation span:nth-child(1) {
    animation-delay: 0s;
}

.typing-animation span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-animation span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}