/* Основные стили для темной темы */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent-color: #8b0000;
    --accent-secondary: #b22222;
    --border-color: #333;
    --success-color: #2e8b57;
    --error-color: #dc143c;
    --warning-color: #ff8c00;
}

* {
    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);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Хедер */
.dark-header {
    background-color: rgba(10, 10, 10, 0.95);
    border-bottom: 1px solid var(--accent-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.dark-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.tagline {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

nav a:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Основной контент */
main {
    flex: 1;
    padding: 30px 0;
}

.flash-messages {
    max-width: 800px;
    margin: 0 auto 20px;
}

.flash {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-weight: 500;
}

.flash.error {
    background-color: rgba(220, 20, 60, 0.2);
    border-left: 4px solid var(--error-color);
    color: #ffb6c1;
}

.flash.success {
    background-color: rgba(46, 139, 87, 0.2);
    border-left: 4px solid var(--success-color);
    color: #98fb98;
}

/* Страница модели */
.model-page-container {
    position: relative;
    min-height: calc(100vh - 200px);
    overflow: hidden;
}

.blurred-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Стили для сетки изображений */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-auto-rows: 200px;
    gap: 15px;
    padding: 20px;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
}

.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.grid-item:hover {
    transform: scale(1.05);
}

.grid-item .blurred-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(12px) brightness(0.4);
    transition: filter 0.3s ease;
}

.grid-item:hover .blurred-image {
    filter: blur(3px) brightness(0.4);
}

/* Размытый профиль */
.blurred-profile {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 12px;
    min-width: 350px;
    max-width: 500px;
    filter: blur(4px);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.profile-overlay {
    color: rgba(255, 255, 255, 0.9);
}

.profile-item {
    margin-bottom: 12px;
    font-size: 1.1rem;
    filter: blur(1.5px);
    opacity: 0.9;
}

.blurred-text {
    filter: blur(1.5px);
    user-select: none;
}

.registration-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 40px;
}

.registration-box {
    background-color: rgba(26, 26, 26, 0.95);
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.warning-text {
    color: var(--warning-color);
    font-size: 1.1rem;
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(255, 140, 0, 0.1);
    border-radius: 5px;
    border-left: 4px solid var(--warning-color);
}

.alert {
    background-color: rgba(139, 0, 0, 0.2);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
}

.requirements {
    background-color: rgba(42, 42, 42, 0.8);
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}

.requirements ul {
    list-style-position: inside;
    margin-top: 10px;
}

.requirements li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.cta-section {
    text-align: center;
    margin-top: 30px;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-warning {
    background-color: var(--warning-color);
    color: black;
    font-weight: bold;
}

.btn-warning:hover {
    background-color: #ff9900;
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Формы */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.auth-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.auth-box h2 {
    color: var(--accent-color);
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.auth-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-check-input {
    margin-right: 10px;
}

.form-check-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.forgot-link {
    color: var(--accent-color);
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.password-requirements {
    background-color: rgba(42, 42, 42, 0.8);
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    border-left: 3px solid var(--accent-color);
}

.password-requirements h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.password-requirements ul {
    list-style-position: inside;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Главная страница */
.main-content {
    max-width: 1000px;
}

.warning-banner {
    background-color: rgba(139, 0, 0, 0.3);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: bold;
}

.intro h2 {
    color: var(--accent-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.description {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.info-box, .warning-box {
    background-color: var(--bg-tertiary);
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
    border-left: 4px solid;
}

.info-box {
    border-left-color: #4682b4;
}

.warning-box {
    border-left-color: var(--warning-color);
}

.info-box h3, .warning-box h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.info-box ul, .warning-box ol {
    margin-left: 20px;
    color: var(--text-secondary);
}

.info-box li, .warning-box li {
    margin-bottom: 8px;
}

.note {
    font-style: italic;
    color: var(--text-secondary);
    margin-top: 15px;
    font-size: 0.9rem;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-top: 40px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 5px;
}

.access-info {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
    margin-top: 40px;
}

.access-info h3 {
    color: var(--accent-color);
    margin-bottom: 20px;
}

.access-info ol {
    margin-left: 20px;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.access-info li {
    margin-bottom: 10px;
}

.cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

/* Футер */
.dark-footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    margin-top: auto;
}

.dark-footer .container {
    text-align: center;
}

.dark-footer p {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.disclaimer {
    font-size: 0.8rem;
    color: #666;
    margin-top: 10px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .dark-header .container {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    nav a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    /* Сетка изображений для мобильных */
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        grid-auto-rows: 100px;
        gap: 8px;
        padding: 10px;
    }
    
    /* Размытый профиль */
    .blurred-profile {
        min-width: 90%;
        max-width: 95%;
        padding: 20px;
        margin: 10px;
        transform: translate(-50%, -50%) scale(0.95);
        filter: blur(3px); /* Еще меньше на мобильных */
    }
    
    .profile-item {
        font-size: 0.9rem;
        margin-bottom: 8px;
        filter: blur(1px); /* Меньше размытие на мобильных */
    }
    
    /* Формы */
    .auth-box, .registration-box {
        padding: 20px;
        margin: 10px;
        width: 95%;
    }
    
    .registration-box h2 {
        font-size: 1.2rem;
    }
    
    .warning-text {
        font-size: 0.9rem;
        padding: 10px;
    }
    
    .alert {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    /* Главная страница */
    .intro h2 {
        font-size: 1.8rem;
    }
    
    .stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-item {
        padding: 10px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    /* Кнопки */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .btn-block {
        width: 100%;
    }
    
    /* Футер */
    .disclaimer {
        font-size: 0.7rem;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    /* Для очень маленьких экранов */
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 80px;
        gap: 5px;
    }
    
    .grid-item .blurred-image {
        filter: blur(4px) brightness(0.75); /* Меньше размытие на маленьких экранах */
    }
    
    .registration-box, .auth-box {
        padding: 15px;
    }
    
    .form-control {
        padding: 10px;
        font-size: 16px; /* Важно для iOS чтобы не зумилось */
    }
    
    /* Улучшаем отображение текста на мобильных */
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    h1, h2, h3 {
        line-height: 1.3;
    }
}

/* Важно для мобильных устройств */
@viewport {
    width: device-width;
    zoom: 1.0;
}

/* Убираем выделение при тапе на мобильных */
a, button, input {
    -webkit-tap-highlight-color: transparent;
}

/* Улучшаем скролл на iOS */
body {
    -webkit-overflow-scrolling: touch;
}

/* Фикс для iOS input zoom */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    select,
    textarea,
    input {
        font-size: 16px !important;
    }
}