/* MOBILE-FIRST DESIGN - Начинаем с мобильных стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 16px; /* Базовый размер для мобильных */
    overflow-x: hidden;
}

/* Touch-friendly базовые элементы */
button, a, input {
    min-height: 44px; /* Apple рекомендует минимум 44px для touch */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* MOBILE-FIRST HEADER с гамбургер меню */
.header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    flex-shrink: 0;
}

/* Гамбургер меню для мобильных */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    min-height: 44px;
    min-width: 44px;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Навигационное меню - скрыто на мобильных */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #ff6b6b, #ee5a24);
    list-style: none;
    padding: 4rem 2rem 2rem;
    transition: right 0.3s ease;
    z-index: 1001;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.nav-menu.active {
    right: 0;
}

.nav-menu li {
    margin-bottom: 1rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 1rem;
    display: block;
    border-radius: 8px;
    transition: background 0.3s;
    min-height: 48px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Overlay для закрытия меню */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Кнопка закрытия меню */
.nav-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    min-height: 44px;
    min-width: 44px;
}

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

.page-title {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    text-align: center;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    padding: 0 1rem;
}

.page-subtitle {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #cccccc;
    padding: 0 1rem;
}

/* MOBILE-FIRST Сетка моделей */
.models-grid {
    display: grid;
    grid-template-columns: 1fr; /* Мобильные: 1 колонка */
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.model-card {
    position: relative;
    background: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

/* Touch-friendly hover эффекты */
.model-card:hover,
.model-card:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.2);
}

@media (hover: none) { /* Для touch устройств убираем hover эффекты */
    .model-card:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
}

.model-image {
    position: relative;
    width: 100%;
    height: 200px; /* Немного меньше для мобильных */
    overflow: hidden;
}

.model-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Убираем scale эффект на touch устройствах */
@media (hover: hover) {
    .model-card:hover .model-image img {
        transform: scale(1.03);
    }
}

/* Iconos en las esquinas */
.model-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.badge {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.badge.hd {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.badge.vr {
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

.badge.mobile {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
}

/* Información del modelo */
.model-info {
    padding: 1rem;
    position: relative;
}

.model-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.online-status {
    width: 8px;
    height: 8px;
    background: #ff4757;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.model-details {
    display: flex;
    justify-content: space-between;
    color: #cccccc;
    font-size: 0.9rem;
}

.viewers {
    color: #ff6b6b;
    font-weight: bold;
}

/* MOBILE-FIRST Кнопка Load More */
.load-more {
    display: block;
    margin: 2rem auto;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    width: 90%;
    max-width: 300px;
    touch-action: manipulation; /* Оптимизация для touch */
}

@media (hover: hover) {
    .load-more:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    }
}

/* MOBILE-FIRST Фильтры по полу */
.gender-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.8rem;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.filter-btn {
    padding: 0.8rem 1rem;
    background: transparent;
    color: #cccccc;
    border: 2px solid #444;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    min-height: 44px;
    touch-action: manipulation;
    text-align: center;
}

.filter-btn.active,
.filter-btn:hover {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border-color: transparent;
    color: white;
}

/* Contenido de texto largo */
.content-text {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: #e0e0e0;
}

.content-text h2 {
    color: #ff6b6b;
    margin: 2rem 0 1rem;
    font-size: 1.8rem;
}

.content-text h3 {
    color: #ffab3d;
    margin: 1.5rem 0 0.8rem;
    font-size: 1.4rem;
}

.content-text ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-text li {
    margin-bottom: 0.5rem;
}

.content-text table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    background: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
}

.content-text th,
.content-text td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #444;
}

.content-text th {
    background: #ff6b6b;
    color: white;
    font-weight: bold;
}

/* Footer */
.footer {
    background: #1a1a1a;
    border-top: 1px solid #333;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: #888;
}

/* MOBILE-FIRST Media Queries - от мелких к крупным экранам */

/* Малые телефоны */
@media (max-width: 380px) {
    .container {
        padding: 0.8rem;
    }
    
    .page-title {
        font-size: 1.6rem;
    }
    
    .model-image {
        height: 180px;
    }
    
    .gender-filters {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Планшеты портретные - 2 колонки */
@media (min-width: 600px) {
    .container {
        padding: 1.5rem;
    }
    
    .models-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .page-title {
        font-size: 2.2rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
    }
    
    .model-image {
        height: 220px;
    }
    
    .load-more {
        width: auto;
        padding: 1rem 3rem;
    }
    
    .gender-filters {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Планшеты альбомные */
@media (min-width: 768px) {
    /* Показываем десктопное меню */
    .mobile-menu-toggle {
        display: none;
    }
    
    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: none;
        padding: 0;
        display: flex;
        flex-direction: row;
        gap: 2rem;
        box-shadow: none;
        right: 0;
    }
    
    .nav-menu li {
        margin-bottom: 0;
    }
    
    .nav-menu a {
        padding: 0.5rem 1rem;
        font-size: 1rem;
        min-height: auto;
    }
    
    .nav-close {
        display: none;
    }
    
    .nav-overlay {
        display: none;
    }
    
    .models-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .logo {
        font-size: 1.6rem;
    }
}

/* Десктопы - 4 колонки */
@media (min-width: 1024px) {
    .container {
        padding: 2rem;
    }
    
    .models-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
        margin-bottom: 3rem;
    }
    
    .page-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .page-subtitle {
        font-size: 1.2rem;
        margin-bottom: 3rem;
    }
    
    .model-image {
        height: 240px;
    }
    
    .load-more {
        margin: 3rem auto;
        font-size: 1.1rem;
    }
    
    .logo {
        font-size: 1.8rem;
    }
}

/* Большие десктопы */
@media (min-width: 1200px) {
    .models-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .model-image {
        height: 260px;
    }
}

/* Página individual del modelo */
.model-page {
    max-width: 1000px;
    margin: 0 auto;
}

.model-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.model-avatar {
    flex-shrink: 0;
}

.model-avatar img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.model-meta {
    flex: 1;
    min-width: 300px;
}

.model-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.model-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.stat-item {
    background: #2a2a2a;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff6b6b;
}

.stat-label {
    color: #cccccc;
    font-size: 0.9rem;
}

.chat-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.chat-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.stream-container {
    margin: 2rem 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stream-container iframe {
    width: 100%;
    height: 500px;
    border: none;
}

/* Tags */
.tags-container {
    margin: 2rem 0;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #444;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #ff6b6b;
    color: white;
}

/* Loading spinner */
.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #444;
    border-top: 4px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}