/* ===== Основные стили MuXolotl ===== */

* {
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* Градиентный текст */
.gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Эффект при наведении на карточки */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Анимированное подчёркивание ссылок */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ===== Фоновые декоративные блобы ===== */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #3b82f6;
    top: 10%;
    left: -10%;
    animation: float 20s ease-in-out infinite;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    top: 60%;
    right: -5%;
    animation: float 25s ease-in-out infinite reverse;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: #6366f1;
    bottom: 10%;
    left: 20%;
    animation: float 18s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== Кнопка "Наверх" ===== */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.scroll-top-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* ===== Переключатель языка ===== */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    background: rgba(55, 65, 81, 0.5);
    border-radius: 0.5rem;
    border: 1px solid rgba(75, 85, 99, 0.5);
}

.lang-btn {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: #e5e7eb;
}

.lang-btn.active {
    background: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

/* ===== Уведомление для мобильных ===== */
.mobile-warning {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    top: auto;
    z-index: 200;
    display: flex;
    justify-content: center;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.mobile-warning.hidden {
    display: none;
}

.mobile-warning-content {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 1rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mobile-warning h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f3f4f6;
    margin-bottom: 0.5rem;
}

.mobile-warning p {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.mobile-warning-btn {
    padding: 0.5rem 1.5rem;
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid #4b5563;
    color: #e5e7eb;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.mobile-warning-btn:hover {
    background: rgba(75, 85, 99, 0.5);
    color: white;
}

/* ===== Placeholder для изображений ===== */
.img-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.5) 0%, rgba(17, 24, 39, 0.5) 100%);
    border: 1px dashed rgba(75, 85, 99, 0.5);
    border-radius: 1rem;
    width: 100%;
    height: 100%;
    min-height: 200px;
    color: #6b7280;
}

/* ===== GitHub статистика ===== */
.github-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.github-stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #d1d5db;
}

.github-stat svg {
    width: 16px;
    height: 16px;
}

.github-stat .count {
    font-weight: 600;
    color: #f3f4f6;
}

.github-stat.loading .count {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.25rem;
    color: transparent;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Лайтбокс ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== Карусель (Carousel) ===== */
.carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 1rem 0; 
}

@media (min-width: 768px) {
    .carousel-wrapper {
        padding: 1rem 4rem;
    }
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
    scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    flex: 0 0 100%;
    scroll-snap-align: center;
    min-width: 0;
}

@media (min-width: 768px) {
    .carousel-item {
        flex: 0 0 calc(50% - 0.75rem);
    }
}

@media (min-width: 1024px) {
    .carousel-item {
        flex: 0 0 calc(33.333% - 1rem);
    }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    background: rgba(31, 41, 55, 0.9);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.carousel-wrapper:hover .carousel-btn {
    opacity: 1;
    visibility: visible;
}

.carousel-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 0.5rem; }
.carousel-btn.next { right: 0.5rem; }

@media (hover: none) {
    .carousel-btn { display: none !important; }
}

/* ===== Стили для Colab карточек и Статусов ===== */
.colab-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.colab-icon-wrapper {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: bold;
}

.icon-orange { background: rgba(249, 115, 22, 0.1); color: #fb923c; }
.icon-pink { background: rgba(236, 72, 153, 0.1); color: #f472b6; }
.icon-cyan { background: rgba(6, 182, 212, 0.1); color: #22d3ee; }

.colab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.colab-btn-primary {
    background: rgba(249, 115, 22, 0.1); 
    color: #fb923c; 
    border: 1px solid rgba(249, 115, 22, 0.2);
}
.colab-btn-primary:hover {
    background: rgba(249, 115, 22, 0.2); 
    border-color: #fb923c;
}

.colab-btn-secondary {
    background: rgba(55, 65, 81, 0.3); 
    color: #9ca3af; 
    border: 1px solid rgba(75, 85, 99, 0.3);
}
.colab-btn-secondary:hover {
    background: rgba(55, 65, 81, 0.5); 
    color: #e5e7eb;
}

/* Статус значки */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto;
    cursor: pointer; /* Курсор руки */
    transition: transform 0.2s ease;
}

.status-badge:hover {
    transform: scale(1.05);
}

.status-badge.online {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-badge.offline {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
}

.status-badge.online .status-dot {
    background-color: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.status-badge.offline .status-dot {
    background-color: #f87171;
}

/* ===== Статус Модальное окно ===== */
.status-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1.5rem;
}

.status-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.status-modal-content {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 1rem;
    padding: 2rem;
    width: 100%;
    max-width: 450px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    text-align: center;
    position: relative;
}

.status-modal-overlay.active .status-modal-content {
    transform: translateY(0);
}

.status-modal-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.status-modal-icon.online {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
}

.status-modal-icon.offline {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.status-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #9ca3af;
    background: transparent;
    border: none;
    cursor: pointer;
}

.status-modal-close:hover {
    color: white;
}