* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

header {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo h1 {
    font-size: 1.5rem;
    color: #ff6b6b; /* Добавьте это для цвета */
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: #ff6b6b;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    text-align: center;
    color: white;
    padding: 3rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.search-bar {
    margin-bottom: 2rem;
}

.search-bar input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.anime-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.anime-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.anime-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.anime-info {
    padding: 1rem;
}

.anime-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.original-title {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.genre {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.episodes {
    color: #4ecdc4;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.watch-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 5px;
    transition: transform 0.3s;
}

.watch-btn:hover {
    transform: scale(1.05);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 2rem;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.anime-details {
    background: white;
    padding: 2rem;
    border-radius: 15px;
}

.info-panel {
    margin: 1rem 0;
}

.genre-badge, .episodes-badge {
    display: inline-block;
    background: #f0f0f0;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-right: 1rem;
    font-size: 0.9rem;
}

.description {
    margin-top: 1rem;
    line-height: 1.6;
    color: #555;
}

.recommendations {
    margin-top: 3rem;
}

.recommendations h3 {
    color: white;
    margin-bottom: 1rem;
}

.anime-card.small img {
    height: 200px;
}

/* Admin Panel Styles */
.admin-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

.admin-sidebar {
    background: #f8f9fa;
    padding: 2rem;
    border-right: 1px solid #dee2e6;
}

.admin-sidebar h3 {
    margin-bottom: 1rem;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar li {
    margin-bottom: 0.5rem;
}

.admin-sidebar a {
    color: #333;
    text-decoration: none;
    display: block;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.admin-sidebar a:hover {
    background: #e9ecef;
}

.admin-content {
    padding: 2rem;
}

.add-anime-form {
    margin-bottom: 3rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.anime-list-admin table {
    width: 100%;
    border-collapse: collapse;
}

.anime-list-admin th,
.anime-list-admin td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.view-btn, .delete-btn {
    text-decoration: none;
    margin: 0 0.25rem;
    font-size: 1.2rem;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.error-message {
    text-align: center;
    color: white;
    padding: 3rem;
}

footer {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .admin-container {
        grid-template-columns: 1fr;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }

    /* Auth Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
}

/* Profile Styles */
.profile-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

.profile-sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    color: white;
    text-align: center;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    margin-bottom: 1rem;
}

.default-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin: 0 auto 1rem;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.profile-content {
    padding: 2rem;
}

.profile-info {
    margin-bottom: 2rem;
}

.watch-history, .favorites {
    margin-top: 2rem;
}

.history-list {
    margin-top: 1rem;
}

.history-item {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item a {
    color: #333;
    text-decoration: none;
}

.history-item a:hover {
    color: #667eea;
}

.watch-date {
    font-size: 0.85rem;
    color: #999;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 2rem;
}

/* Comments Styles */
.comments-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 1rem;
    resize: vertical;
}

.comment-form button {
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.comments-list {
    margin-top: 2rem;
}

.comment {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.comment-header {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.comment-header strong {
    color: #667eea;
}

.comment-date {
    color: #999;
    margin-left: 1rem;
}

.comment-text {
    color: #555;
    line-height: 1.5;
}

/* Anime Actions */
.anime-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.favorite-btn {
    background: none;
    border: 2px solid #ff6b6b;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.favorite-btn.active {
    background: #ff6b6b;
    color: white;
}

.rating-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.average-rating {
    font-size: 1.2rem;
   
}