/* Основные переменные для темно-синей неоновой темы */
:root {
    --bg-primary: #0a0c14;        /* очень темный синий */
    --bg-secondary: #111827;       /* темно-синий */
    --bg-tertiary: #1e2a3a;        /* синий с оттенком */
    --text-primary: #e2e8ff;       /* светлый синеватый */
    --text-secondary: #9aa9c7;      /* приглушенный синий */
    --accent: #3b82f6;             /* ярко-синий */
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --border: #2d3a4f;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    /* Неоновые тени */
    --neon-shadow: 0 0 5px var(--accent-glow), 0 0 20px var(--accent-glow);
    --neon-shadow-hover: 0 0 10px var(--accent-glow), 0 0 30px var(--accent-glow);
    --card-glow: 0 0 15px rgba(59, 130, 246, 0.3);
    --neon-blue-light: #60a5fa;
    --neon-blue: #3b82f6;
    --neon-blue-dark: #1e3a8a;
}

/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    background-image: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 30%);
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Навигация */
.navbar {
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    text-decoration: none;
    text-shadow: 0 0 10px var(--accent-glow);
    transition: text-shadow 0.3s;
     color: #ff0000 !important; /* ярко-красный */
    animation: red-neon-pulse 2s infinite alternate;
}

@keyframes red-neon-pulse {
    from {
        text-shadow: 0 0 5px #ff0000, 0 0 15px #ff0000, 0 0 30px #ff4d4d;
    }
    to {
        text-shadow: 0 0 10px #ff0000, 0 0 25px #ff0000, 0 0 50px #ff4d4d;
    }
}

.logo:hover {
    text-shadow: 0 0 10px #ff0000, 0 0 30px #ff0000, 0 0 60px #ff4d4d;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

.nav-link:hover {
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent-glow);
}

/* Поиск в навигации */
.search-nav-form {
    display: flex;
    align-items: center;
    margin: 0 1rem;
}
.search-nav-wrapper {
    display: flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 0.2rem 0.2rem 0.2rem 1rem;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}
.search-nav-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    background: rgba(30, 41, 59, 0.8);
}
.search-nav-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    padding: 0.5rem 0;
    width: 200px;
    outline: none;
    transition: width 0.3s ease;
}
.search-nav-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
    letter-spacing: 0.5px;
}
.search-nav-btn {
    background: var(--accent);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 8px var(--accent-glow);
}
.search-nav-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--accent-glow);
}
.search-nav-icon {
    fill: white;
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}
.search-nav-btn:hover .search-nav-icon {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .search-nav-input {
        width: 120px;
        font-size: 0.85rem;
    }
    .search-nav-btn {
        width: 30px;
        height: 30px;
    }
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 0 10px var(--accent-glow);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--border);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.btn-danger:hover {
    background-color: #dc2626;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.7);
}

/* Формы */
.form-control {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3), 0 0 15px var(--accent-glow);
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Карточки аниме */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.anime-card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border);
    position: relative;
}

.anime-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), var(--card-glow);
    border-color: var(--accent);
}

.anime-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s;
}

.anime-card:hover::before {
    left: 100%;
}

.anime-poster {
   height: 280px;
width: 100%;
object-fit: cover;
}

.anime-info {
    padding: 1rem;
}

.anime-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.anime-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Сообщения */
.messages {
    margin: 1rem 0;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
    animation: slideIn 0.3s ease-out;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-left-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.alert-error,
.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-left-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-left-color: #f59e0b;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

/* Основной контент */
main {
    min-height: calc(100vh - 140px);
}

/* Футер */
footer {
    background-color: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(5px);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    text-align: center;
    color: var(--text-secondary);
}

/* Утилиты */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Анимации для статусов */
@keyframes watching-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes planned-glow {
    0% { box-shadow: 0 0 5px rgba(139, 92, 246, 0.5); }
    50% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.8); }
    100% { box-shadow: 0 0 5px rgba(139, 92, 246, 0.5); }
}

@keyframes completed-sparkle {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes dropped-fade {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

@keyframes onhold-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Применение анимаций */
.status-option.watching .status-option-icon {
    animation: watching-pulse 2s infinite;
}

.status-option.planned .status-option-icon {
    animation: planned-glow 3s infinite;
}

.status-option.completed .status-option-icon {
    animation: completed-sparkle 5s linear infinite;
}

.status-option.dropped .status-option-icon {
    animation: dropped-fade 2s infinite;
}

.status-option.onhold .status-option-icon {
    animation: onhold-bounce 2s infinite;
}

/* Неоновые элементы для статусов */
.status-option {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s;
}

.status-option.active {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Прогресс бар с неоном */
.progress-bar {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}
.spinner {
    border: 4px solid rgba(0, 243, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
}
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
}
.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}
.anime-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent; /* невидимая рамка по умолчанию */
    transition: transform 0.3s, border-color 0.3s;
    cursor: pointer;
}

 /* Переливающееся синее свечение при наведении */
.anime-card:hover {
    transform: translateY(-5px);
    border-color: #3b82f6; /* ярко-синий */
    animation: blue-pulse 1.8s infinite alternate;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.5);
}

@keyframes blue-pulse {
    0% {
        border-color: #3b82f6; /* ярко-синий */
        box-shadow: 0 0 10px #3b82f6, 0 0 20px #3b82f6;
    }
    50% {
        border-color: #1e3a8a; /* тёмно-синий */
        box-shadow: 0 0 15px #1e3a8a, 0 0 30px #1e3a8a;
    }
    100% {
        border-color: #60a5fa; /* светло-синий */
        box-shadow: 0 0 20px #60a5fa, 0 0 40px #60a5fa;
    }
}
.anime-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}
.anime-info {
    padding: 12px;
}
.anime-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.anime-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.85rem;
}
/* --- Блок поиска над контентом (для всех страниц, кроме главной) --- */
.search-block {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.9), rgba(10, 12, 20, 0.95));
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(90deg, var(--accent), #8b5cf6, var(--accent)) 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: slideDown 0.5s ease-out;
}

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

.search-block-form {
    display: flex;
    justify-content: center;
}

.search-block-wrapper {
    display: flex;
    align-items: center;
    background: rgba(10, 12, 20, 0.6);
    border: 2px solid transparent;
    border-radius: 60px;
    padding: 0.4rem 0.4rem 0.4rem 1.8rem;
    backdrop-filter: blur(10px);
    transition: all 0.4s;
    width: 100%;
    max-width: 700px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(59, 130, 246, 0.3);
    position: relative;
    background-clip: padding-box;
}

.search-block-wrapper::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent), #8b5cf6, #ec4899, var(--accent));
    border-radius: 60px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
}

.search-block-wrapper:focus-within {
    box-shadow: 0 0 30px var(--accent-glow);
    transform: scale(1.02);
}

.search-block-wrapper:focus-within::before {
    opacity: 1;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.search-block-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 0.9rem 0;
    outline: none;
    letter-spacing: 0.5px;
}

.search-block-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
    font-weight: 300;
    text-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
}

.search-block-button {
    background: linear-gradient(135deg, var(--accent), #2563eb);
    border: none;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 15px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.search-block-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.search-block-button:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 30px var(--accent-glow), 0 0 60px var(--accent-glow);
}

.search-block-button:hover::after {
    opacity: 1;
}

.search-block-icon {
    fill: white;
    width: 24px;
    height: 24px;
    transition: transform 0.3s;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}

.search-block-button:hover .search-block-icon {
    transform: scale(1.2);
}

/* Адаптивность для блока поиска */
@media (max-width: 768px) {
    .search-block-wrapper {
        max-width: 95%;
        padding-left: 1.2rem;
    }
    .search-block-input {
        font-size: 1rem;
        padding: 0.7rem 0;
    }
    .search-block-button {
        width: 46px;
        height: 46px;
    }
    .search-block-icon {
        width: 20px;
        height: 20px;
    }
}
