* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: url('background.jpg') no-repeat center center/cover;
    background-color: #121212;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.main-container {
    width: 80%;
    max-width: 900px;
    background: rgb(112, 182, 196);
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.header {
    position: relative;
    background: #941515;
    color: rgb(248, 202, 202);
    padding: 15px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
}

.home-button {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgb(248, 202, 202);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s;
}

.home-button:hover {
    background: rgba(0, 0, 0, 0.5);
}

.content {
    display: flex;
    padding: 20px;
    gap: 20px;
}

.image-section {
    flex: 0 0 200px;
}

.logo {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.info-section {
    flex: 1;
    text-align: left;
}

h1 {
    font-size: 24px;
    color: #1a3d7c;
    margin-bottom: 5px;
}

h2 {
    font-size: 18px;
    color: #666;
    margin-bottom: 15px;
}

h3 {
    font-size: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.status-section ul {
    list-style-type: none;
}

.status-section li {
    margin-bottom: 8px;
}

.watch-order {
    margin-top: 20px;
}

.order-links {
    display: flex;
    gap: 15px;
}

.order-links span {
    cursor: pointer;
    color: #1a3d7c;
}

.order-links span:hover {
    text-decoration: underline;
}


/* Адаптация для мобильных устройств */

@media (max-width: 768px) {
    .content {
        flex-direction: column;
    }
    .image-section {
        text-align: center;
        margin-bottom: 15px;
    }
    .logo {
        max-width: 200px;
    }
}

.tabs-container {
    margin-top: 20px;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.tab-button {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #f1f1f1;
    border: none;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    font-weight: bold;
    color: #1a3d7c;
}

.tab-button.active {
    background-color: #1a3d7c;
    color: white;
}

.tab-pane {
    display: none;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

.tab-pane.active {
    display: block;
}

.video-container {
    margin: 15px 0;
    background: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.video-container h4 {
    color: #1a3d7c;
    margin-bottom: 10px;
}

video {
    max-width: 100%;
    border-radius: 5px;
    background: #000;
}

.video-description {
    margin-top: 10px;
    color: #555;
    font-size: 14px;
}

.trailers-container {
    margin: 15px 0;
}

.youtube-video {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 соотношение */
    height: 0;
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
}

.youtube-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.trailers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.trailer-item {
    background: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.trailer-item h5 {
    color: #1a3d7c;
    margin-bottom: 10px;
}

.youtube-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
    /* Черный фон пока видео загружается */
}

.similar-anime {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.anime-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #1a3d7c;
    width: 120px;
}

.anime-link img {
    width: 100%;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: transform 0.3s;
}

.anime-link:hover img {
    transform: scale(1.05);
}

.anime-link span {
    text-align: center;
    font-weight: bold;
}

.episode-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.episode-btn {
    padding: 8px 15px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.episode-btn:hover {
    background: #555;
}

.episode-btn.active {
    background: #1a3d7c;
    font-weight: bold;
}