/* ==============================
   Глобальные стили
============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --success: #2ecc71;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #f9f9f9;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==============================
   Header
============================== */
header {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--secondary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* ==============================
   Hero Section
============================== */
.hero {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    color: white;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 1s forwards 0.5s;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInUp 1s forwards 0.8s;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    opacity: 0;
    animation: fadeInUp 1s forwards 1.1s;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary);
    transform: translateY(-3px);
}

.hero-visual {
    flex: 1;
    position: relative;
    height: 400px;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: white;
    animation: float 3s ease-in-out infinite;
}

.floating-card i {
    font-size: 2rem;
}

.card-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 10%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 20%;
    left: 30%;
    animation-delay: 2s;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.hero-wave .shape-fill {
    fill: #f9f9f9;
}

/* ==============================
   Works Section
============================== */
.works {
    padding: 100px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    display: inline-block;
    margin-bottom: 15px;
}

.section-title p {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary);
    border-radius: 2px;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.work-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.work-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.work-img {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.work-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.work-card:hover .work-img img {
    transform: scale(1.1);
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(52, 152, 219, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.work-card:hover .work-overlay {
    opacity: 1;
}

.work-links {
    display: flex;
    gap: 15px;
}

.work-link {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    text-decoration: none;
    transition: transform 0.3s;
}

.work-link:hover {
    transform: scale(1.1);
}

.work-content {
    padding: 25px;
}

.work-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.work-content p {
    color: #666;
    margin-bottom: 15px;
}

.work-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: var(--light);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}


/* ==============================
   Enhanced Chatbox Design
============================== */
.chatbox-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chatbox-toggle {
    width: 70px;
    height: 70px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid white;
    position: relative;
    overflow: hidden;
}

.chatbox-toggle::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: left 0.5s;
}

.chatbox-toggle:hover::before {
    left: 100%;
}

.chatbox-toggle:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 12px 30px rgba(52, 152, 219, 0.4);
}

.chatbox-toggle .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

.chatbox {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 380px;
    height: 500px;
    max-height: 70vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.chatbox.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.chatbox-header {
    background: var(--gradient);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.chatbox-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><circle cx="50" cy="50" r="2" fill="white"/></svg>') repeat;
    animation: float 20s linear infinite;
}

.chatbox-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbox-header h3::before {
    content: '💬';
    font-size: 1.2em;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.close-chat {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s;
    position: relative;
    z-index: 2;
}

.close-chat:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.chatbox-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Custom scrollbar for chat */
.chatbox-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbox-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.chatbox-messages::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 3px;
}

.chatbox-messages::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.message {
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
    animation: messageSlide 0.3s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: black;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    background: white;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.bot-message::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 10px 10px;
    border-color: transparent transparent white transparent;
}

.user-message {
    background: var(--gradient);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.user-message::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 10px 10px 0;
    border-color: transparent var(--secondary) transparent transparent;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 5px;
    text-align: right;
}

.chatbox-input {
    display: flex;
    padding: 15px 20px;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    gap: 10px;
    align-items: center;
}

.chatbox-input input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    outline: none;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: #f8f9fa;
    color: #333;
}

.chatbox-input input:focus {
    border-color: var(--secondary);
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    color: #333;
}

.chatbox-input input::placeholder {
    color: #6c757d;
}

.send-btn {
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.send-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.send-btn:active {
    transform: scale(0.95);
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: white;
    border-radius: 18px;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    font-size: 0.9rem;
    color: #666;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #666;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Order Form Styles */
.order-form {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    animation: formSlide 0.4s ease-out;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

@keyframes formSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    background: var(--gradient);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.close-form {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.close-form:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.form-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-body input,
.form-body textarea {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
    background: #f8f9fa;
    font-family: inherit;
    color: #333; /* Добавляем цвет текста */
}

.form-body input:focus,
.form-body textarea:focus {
    border-color: var(--secondary);
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    color: #333; /* Цвет текста при фокусе */
}

.form-body input::placeholder,
.form-body textarea::placeholder {
    color: #6c757d;
}

/* Улучшаем видимость сообщений */
.user-message {
    background: var(--gradient);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.bot-message {
    background: white;
    color: #333; /* Темный текст для сообщений бота */
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Кнопка отправки в форме */
#submitOrder {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    margin-top: 10px;
    width: 100%;
}

#submitOrder:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

#submitOrder:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Статус формы */
.form-status {
    text-align: center;
    font-size: 0.9rem;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    min-height: 20px;
}

.form-body textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.4;
}

.form-body .btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    margin-top: 10px;
}

.form-body .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.form-body .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-status {
    text-align: center;
    font-size: 0.9rem;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

/* Quick Replies */
/* Анимация появления сообщения */
@keyframes fadeIn {
  from {opacity: 0; transform: translateY(6px);}
  to {opacity: 1; transform: translateY(0);}
}

.message {
  animation: fadeIn 0.25s ease forwards;
}

/* Анимация появления кнопок */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  animation: fadeIn 0.25s ease forwards;
}

.quick-reply {
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 18px;
  border: 1px solid #5e88ff;
  transition: 0.25s;
}

.quick-reply:hover {
  background: #5e88ff;
  color: #fff;
}


/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbox-container {
        bottom: 20px;
        right: 20px;
    }
    
    .chatbox-toggle {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .chatbox {
        width: calc(100vw - 40px);
        right: 20px;
        bottom: 80px;
        height: 60vh;
    }
    
    .chatbox-header {
        padding: 15px 20px;
    }
    
    .chatbox-messages {
        padding: 15px;
    }
    
    .chatbox-input {
        padding: 12px 15px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .chatbox {
        background: #2d3748;
        color: white;
    }
    
    .chatbox-messages {
        background: #1a202c;
    }
    
    .bot-message {
        background: #4a5568;
        color: white;
        border-color: #718096;
    }
    
    .chatbox-input input {
        background: #4a5568;
        border-color: #718096;
        color: white;
    }
    
    .chatbox-input input::placeholder {
        color: #a0aec0;
    }
}

/* ==============================
   Footer
============================== */
footer {
    background-color: var(--primary);
    color: white;
    padding: 60px 0 30px;
}

.footer-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-col h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    position: relative;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--secondary);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    color: var(--light);
    text-decoration: none;
    transition: color .3s;
}

.footer-col a:hover {
    color: var(--secondary);
}

footer i {
    margin-right: 8px;
    width: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-link:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ==============================
   Анимации
============================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

/* ==============================
   Responsive
============================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-visual {
        height: 300px;
    }

    .about-content {
        flex-direction: column;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .chatbox {
        width: 90vw;
        right: 5vw;
        bottom: 90px;
    }

    .footer-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-links {
        justify-content: center;
    }
}

.loading-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.loading-dots div {
  width: 6px;
  height: 6px;
  background: #5e88ff;
  border-radius: 50%;
  animation: pulse 0.6s infinite alternate;
}

.loading-dots div:nth-child(2) { animation-delay: 0.15s; }
.loading-dots div:nth-child(3) { animation-delay: 0.30s; }

@keyframes pulse {
  from { opacity: 0.3; transform: scale(0.8); }
  to   { opacity: 1;   transform: scale(1.2); }
}

.btn.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn.loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 3px solid white;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes spin {
  from { transform: translateY(-50%) rotate(0deg); }
  to   { transform: translateY(-50%) rotate(360deg); }
}
