/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Хедер */
.header {
    background-color: #c93333;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.logo a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
}

.online-count {
    font-size: 14px;
    background-color: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 3px;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 3px;
    font-weight: bold;
    font-size: 14px;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-login {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-login:hover {
    background-color: white;
    color: #c93333;
}

.btn-register {
    background-color: #28a745;
    color: white;
}

.btn-register:hover {
    background-color: #218838;
}

.btn-primary {
    background-color: #c93333;
    color: white;
}

.btn-primary:hover {
    background-color: #a82828;
}

/* Категории */
.categories {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 3px rgba(0,0,0,0.05);
}

.category-list {
    list-style: none;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0;
}

.category-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    text-decoration: none;
    color: #666;
    border-radius: 3px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-item.active a,
.category-item a:hover {
    background-color: #f8f8f8;
    color: #c93333;
}

.category-icon {
    font-size: 18px;
}

.category-name {
    font-weight: bold;
    font-size: 14px;
}

.category-count {
    color: #999;
    font-size: 13px;
}

/* Основной контент */
.main-content {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

.additional-text {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Стили для заголовков внутри дополнительного текста */
.additional-text h1 {
    color: #c93333;
    margin-bottom: 15px;
    font-size: 28px;
}

.additional-text h2 {
    color: #c93333;
    margin-bottom: 15px;
    font-size: 24px;
}

.additional-text h3 {
    color: #c93333;
    margin-bottom: 12px;
    font-size: 20px;
}

/* Стили для параграфов внутри дополнительного текста */
.additional-text p {
    margin-bottom: 15px;
}

/* Стили для акцентов (жирный текст) */
.additional-text strong {
    color: #c93333;
}

/* Стили для таблиц внутри дополнительного текста */
.additional-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.additional-text table td {
    padding: 12px;
    border: 1px solid #e0e0e0;
}

.additional-text table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.additional-text table tr:hover {
    background-color: #f0f0f0;
}

.additional-text table td:first-child {
    font-weight: bold;
    color: #c93333;
    width: 150px;
}

/* Стили для маркированных списков */
.additional-text ul {
    margin: 20px 0;
    padding-left: 30px;
}

.additional-text ul li {
    margin-bottom: 10px;
    line-height: 1.8;
}

/* Стили для нумерованных списков */
.additional-text ol {
    margin: 20px 0;
    padding-left: 30px;
}

.additional-text ol li {
    margin-bottom: 10px;
    line-height: 1.8;
}

/* Сетка моделей */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.model-card {
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.model-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.model-image {
    position: relative;
    width: 100%;
    padding-top: 133%; /* Соотношение 3:4 */
    overflow: hidden;
}

.model-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 10px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 3px;
    color: white;
}

.badge-hd {
    left: 10px;
    background-color: #ff6b6b;
}

.badge-vibra {
    right: 10px;
    background-color: #9b59b6;
}

.model-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 15px;
    color: white;
}

.model-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.model-name {
    font-weight: bold;
    font-size: 16px;
}

.model-age {
    font-size: 14px;
    color: #ddd;
}

.model-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.viewers {
    display: flex;
    align-items: center;
    gap: 5px;
}

.no-models {
    text-align: center;
    padding: 50px 20px;
    background-color: white;
    border-radius: 5px;
}

/* Страница трансляции */
.chat-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.chat-main h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.video-container {
    background-color: #000;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.video-player {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 */
    position: relative;
    display: block;
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.offline-placeholder {
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.offline-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    width: 80%;
}

.offline-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid white;
}

.offline-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.offline-content p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* Информация о модели */
.model-details {
    background-color: white;
    padding: 25px;
    border-radius: 5px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.model-details h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.info-table tr:last-child {
    border-bottom: none;
}

.info-table td {
    padding: 12px 0;
    font-size: 14px;
}

.info-table td:first-child {
    width: 40%;
    color: #666;
}

/* Боковая панель */
.chat-sidebar h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.related-models {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-model-card {
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-model-card:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.related-model-card a {
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    padding: 10px;
}

.related-model-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.related-model-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.related-model-name {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.related-model-age {
    font-size: 13px;
    color: #666;
}

.related-model-viewers {
    font-size: 12px;
    color: #999;
}

.no-related {
    text-align: center;
    padding: 20px;
    color: #999;
}

/* Страница 404 */
.error-page {
    text-align: center;
    padding: 80px 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.error-code {
    font-size: 120px;
    font-weight: bold;
    color: #c93333;
    margin-bottom: 20px;
}

.error-page h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #333;
}

.error-page p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

/* Футер */
.footer {
    background-color: #333;
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 50px;
}

.footer p {
    margin: 0;
    font-size: 14px;
}

/* Адаптивность для планшетов */
@media (max-width: 1024px) {
    .chat-layout {
        grid-template-columns: 1fr;
    }
    
    .chat-sidebar {
        order: 2;
    }
    
    .related-models {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .models-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Мобильная версия */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo a {
        flex-direction: column;
        gap: 5px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .header-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .category-list {
        justify-content: flex-start;
    }
    
    .models-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .model-name {
        font-size: 14px;
    }
    
    .model-age,
    .model-stats {
        font-size: 12px;
    }
    
    .chat-main h1 {
        font-size: 24px;
    }
    
    .related-models {
        grid-template-columns: 1fr;
    }
    
    .model-details {
        padding: 15px;
    }
    
    .info-table td {
        padding: 10px 0;
        font-size: 13px;
    }
    
    .info-table td:first-child {
        width: 45%;
    }
    
    .error-code {
        font-size: 80px;
    }
    
    .error-page h2 {
        font-size: 24px;
    }

/* Адаптивность таблицы для мобильных */
    .additional-text table {
        font-size: 13px;
    }
    
    .additional-text table td {
        padding: 8px;
        display: block;
        width: 100% !important;
        border: none;
    }
    
    .additional-text table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 5px;
        overflow: hidden;
    }
    
    .additional-text table tr:first-child {
        display: none; /* Скрыть заголовок таблицы */
    }
    
    .additional-text table td:first-child {
        background-color: #c93333;
        color: white;
        font-size: 14px;
        padding: 10px;
    }
    
    .additional-text table td:first-child a {
        color: white;
    }
}

@media (max-width: 480px) {
    .models-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    .category-item a {
        padding: 8px 12px;
        font-size: 13px;
    }
}