/* ===== Базовые стили ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ef4444;
    --primary-light: #f87171;
    --blue: #3b82f6;
    --blue-light: rgba(59, 130, 246, 0.15);
    --green: #22c55e;
    --green-light: rgba(34, 197, 94, 0.15);
    --yellow: #eab308;
    --yellow-light: rgba(234, 179, 8, 0.15);
    --red: #ef4444;
    --red-light: rgba(239, 68, 68, 0.15);
    --purple: #ef4444;
    --purple-light: rgba(239, 68, 68, 0.15);

    --bg: #0f0f0f;
    --bg-white: #141414;
    --text: #f1f1f1;
    --text-light: #a0a0a0;
    --border: #2a2a2a;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);

    --radius: 12px;
    --radius-sm: 8px;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://avatars.mds.yandex.net/i?id=914585a149fc221e1bbd4cad0f6a9fb6_l-5398918-images-thumbs&n=13');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.08;
    filter: hue-rotate(-40deg) saturate(2);
    pointer-events: none;
    z-index: -1;
}

/* ===== Навигация ===== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    background: linear-gradient(135deg, var(--red), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: var(--purple-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-btn {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-btn:hover {
    background: var(--border);
}

.admin-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--red);
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    display: none;
}

.admin-badge.show {
    display: block;
}

.notifications-btn {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.notifications-btn:hover {
    background: var(--border);
}

.notif-icon {
    font-size: 1.25rem;
}

.notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--red);
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    display: none;
}

.notif-badge.show {
    display: block;
}

.user-menu {
    display: flex;
    gap: 0.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red-light), rgba(255, 107, 107, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    overflow: hidden;
}

.user-avatar.has-image {
    background: none;
}

.user-name {
    font-weight: 500;
    cursor: pointer;
}

.user-name:hover {
    color: var(--primary);
}

/* ===== Кнопки ===== */
.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, #ff3333, #cc0000);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    font-weight: 700;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-large {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

/* ===== Страницы ===== */
.page {
    display: none;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.page.active {
    display: block;
}

/* ===== Hero секция ===== */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
    min-height: 50vh;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 700px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://static.vecteezy.com/system/resources/previews/012/621/073/non_2x/3d-wireframe-terrain-wide-angle-eps10-vector.jpg');
    background-size: cover;
    background-position: center;
    filter: hue-rotate(150deg) saturate(1.3);
    opacity: 0.4;
    z-index: -1;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #ff2222, #ff4444, #ff3333);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.floating-cube {
    width: 350px;
    height: 350px;
    background: transparent;
    border: 4px solid rgba(255, 50, 50, 0.5);
    border-radius: 30px;
    animation: float 6s ease-in-out infinite;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 700px;
}

.cube {
    width: 170px;
    height: 170px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 10s linear infinite;
}

.cube-face {
    position: absolute;
    width: 170px;
    height: 170px;
    border: 3px solid #ff3333;
    background:
        linear-gradient(90deg, transparent 46%, rgba(255, 40, 40, 0.6) 46%, rgba(255, 40, 40, 0.6) 54%, transparent 54%),
        linear-gradient(0deg, transparent 46%, rgba(255, 40, 40, 0.6) 46%, rgba(255, 40, 40, 0.6) 54%, transparent 54%),
        linear-gradient(90deg, transparent 21%, rgba(255, 40, 40, 0.35) 21%, rgba(255, 40, 40, 0.35) 29%, transparent 29%),
        linear-gradient(90deg, transparent 71%, rgba(255, 40, 40, 0.35) 71%, rgba(255, 40, 40, 0.35) 79%, transparent 79%),
        linear-gradient(0deg, transparent 21%, rgba(255, 40, 40, 0.35) 21%, rgba(255, 40, 40, 0.35) 29%, transparent 29%),
        linear-gradient(0deg, transparent 71%, rgba(255, 40, 40, 0.35) 71%, rgba(255, 40, 40, 0.35) 79%, transparent 79%);
    box-shadow: 0 0 35px rgba(255, 30, 30, 0.5), inset 0 0 50px rgba(255, 50, 50, 0.15);
}

.cube-face.front  { transform: translateZ(85px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(85px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(85px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(85px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(85px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(85px); }

@keyframes rotateCube {
    0% { transform: rotateX(-20deg) rotateY(0deg); }
    100% { transform: rotateX(-20deg) rotateY(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ===== Особенности ===== */
.features {
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.features-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.features-cube {
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.card-blue {
    border-top: 4px solid var(--blue);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.1) 0%, var(--bg-white) 30%);
}

.card-green {
    border-top: 4px solid var(--green);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.1) 0%, var(--bg-white) 30%);
}

.card-yellow {
    border-top: 4px solid var(--yellow);
    background: linear-gradient(180deg, rgba(234, 179, 8, 0.1) 0%, var(--bg-white) 30%);
}

.card-red {
    border-top: 4px solid var(--red);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.1) 0%, var(--bg-white) 30%);
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== Модели Grid ===== */
.popular-section, .catalog-header {
    padding: 3rem 0;
}

.popular-section h2, .catalog-header h1 {
    margin-bottom: 2rem;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.model-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.model-image {
    height: 200px;
    background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
}

.model-format {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--bg-white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

.model-price-tag {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Кнопка избранного (сердечко) */
.favorite-btn {
    position: absolute;
    top: 0.75rem;
    right: 4.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.favorite-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.favorite-btn .heart-icon {
    width: 18px;
    height: 18px;
    stroke: #ffffff;
    fill: none;
    transition: all 0.2s;
}

.favorite-btn.favorited .heart-icon {
    stroke: #ef4444;
    fill: #ef4444;
}

.favorite-btn:hover .heart-icon {
    stroke: #ef4444;
}

/* Кнопка удаления */
.delete-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.delete-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.delete-btn svg {
    width: 16px;
    height: 16px;
    stroke: #ffffff;
}

/* Кнопка редактирования */
.edit-btn {
    position: absolute;
    top: 0.75rem;
    right: 3rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.edit-btn:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.edit-btn svg {
    width: 16px;
    height: 16px;
    stroke: #ffffff;
}

.price-free {
    background: var(--green);
    color: white;
}

.price-paid {
    background: linear-gradient(135deg, var(--yellow), #f59e0b);
    color: white;
}

.model-info {
    padding: 1rem;
}

.model-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.model-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Каталог фильтры ===== */
.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-light);
}

.filter-group select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
}

.search-box {
    flex: 1;
    min-width: 200px;
}

.search-box input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box input::placeholder,
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

/* ===== Форма загрузки ===== */
.upload-container {
    max-width: 700px;
    margin: 0 auto;
}

.upload-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.upload-form {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s;
    background: var(--bg);
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload:hover {
    border-color: var(--primary);
    background: var(--purple-light);
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
}

.upload-icon {
    font-size: 2rem;
}

.file-upload img {
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* Счётчик символов */
.char-counter {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: normal;
}

/* Подсказка для загрузки */
.upload-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: normal;
}

/* Сетка превью изображений */
.preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.preview-grid.has-images {
    flex-direction: row;
    padding: 1rem;
}

.preview-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 2px solid var(--border);
}

.preview-count {
    font-size: 0.85rem;
    color: var(--text-light);
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
}

/* ===== Галерея модели ===== */
.model-gallery {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-main {
    flex: 1;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    min-height: 250px;
}

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow-x: auto;
}

.gallery-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.gallery-thumb:hover {
    border-color: var(--primary);
    opacity: 0.8;
}

.gallery-thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.3);
}

/* ===== Авторы ===== */
.creators-header {
    text-align: center;
    margin-bottom: 3rem;
}

.creators-header p {
    color: var(--text-light);
    margin-top: 0.5rem;
}

.creators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.creator-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.creator-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.creator-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red-light), rgba(255, 107, 107, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    overflow: hidden;
}

.creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creator-info {
    flex: 1;
}

.creator-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.creator-stats {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ===== Профиль ===== */
.profile-container {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red-light), rgba(255, 107, 107, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    overflow: hidden;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    margin-bottom: 0.25rem;
}

.profile-info p {
    color: var(--text-light);
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.profile-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s;
}

.tab-btn:hover, .tab-btn.active {
    background: var(--primary);
    color: white;
}

.profile-tab {
    display: none;
}

.profile-tab.active {
    display: block;
}

/* ===== Детали модели ===== */
.model-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.model-preview .model-image {
    height: 400px;
    border-radius: var(--radius);
}

.model-info-detail {
    display: flex;
    flex-direction: column;
}

.model-format-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), #dc2626);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    width: fit-content;
    margin-bottom: 1rem;
}

.model-info-detail h1 {
    margin-bottom: 1rem;
}

.model-info-detail .model-author {
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.model-info-detail .model-author:hover {
    color: var(--primary);
}

.model-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.model-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.model-price-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.model-price-large {
    font-size: 2rem;
    font-weight: 700;
    color: var(--green);
}

.model-actions {
    margin-top: auto;
}

/* ===== Уведомления панель ===== */
.notifications-panel {
    position: fixed;
    top: 70px;
    right: 2rem;
    width: 350px;
    max-height: 400px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 99;
    display: none;
    overflow: hidden;
}

.notifications-panel.show {
    display: block;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.notifications-header h3 {
    margin: 0;
}

.panel-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}

.panel-close:hover {
    color: var(--text);
}

.notifications-list {
    max-height: 340px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-item:hover {
    background: var(--bg);
}

.notification-item.unread {
    background: rgba(239, 68, 68, 0.1);
}

.notification-content {
    flex: 1;
    cursor: pointer;
}

.notification-text {
    font-size: 0.9rem;
}

.notification-time {
    font-size: 0.8rem;
    color: var(--text-light);
}

.notification-delete {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    opacity: 0.5;
    transition: all 0.2s;
}

.notification-delete:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.no-notifications {
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
}

/* ===== Модальные окна ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: none;
}

.modal-overlay.show {
    display: block;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #121212;
    padding: 2rem;
    border-radius: var(--radius);
    width: 90%;
    max-width: 450px;
    z-index: 201;
    display: none;
    border: 1px solid #2a2a2a;
}

.modal.show {
    display: block;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-close:hover {
    color: var(--text);
}

.modal-footer-text {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-light);
}

.modal-footer-text a {
    color: var(--primary);
    text-decoration: none;
}

/* ===== Модальное окно с правилами ===== */
.modal.modal-wide {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.rules-content {
    margin-bottom: 1.5rem;
}

.rules-section {
    margin-bottom: 1.25rem;
}

.rules-section h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.rules-section ul {
    margin: 0;
    padding-left: 1.25rem;
}

.rules-section li {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    line-height: 1.4;
}

/* ===== Чекбокс правил ===== */
.rules-checkbox {
    margin: 1.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.checkbox-label a {
    color: var(--primary);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* ===== Toast уведомление ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 300;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: var(--green);
}

.toast.error {
    background: var(--red);
}

/* ===== Пустое состояние ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
    grid-column: 1 / -1;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.1rem;
}

/* ===== Личный кабинет ===== */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.dashboard-user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.dashboard-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red-light), rgba(255, 107, 107, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    overflow: hidden;
}

.dashboard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-user-details h1 {
    margin-bottom: 0.25rem;
    font-size: 1.75rem;
}

.dashboard-user-details p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.dashboard-stats {
    display: flex;
    gap: 2rem;
}

.dashboard-stat {
    display: flex;
    flex-direction: column;
}

.dashboard-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.dashboard-stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.dashboard-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.dashboard-tab-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s;
}

.dashboard-tab-btn:hover {
    background: var(--border);
    color: var(--text);
}

.dashboard-tab-btn.active {
    background: var(--primary);
    color: white;
}

.dashboard-content {
    min-height: 400px;
}

.dashboard-tab-content {
    display: none;
}

.dashboard-tab-content.active {
    display: block;
}

.my-models-header {
    margin-bottom: 1.5rem;
}

.my-models-header h2 {
    margin-bottom: 0.25rem;
}

.my-models-header .subtitle {
    color: var(--text-light);
}

.settings-container {
    max-width: 600px;
}

.settings-container h2 {
    margin-bottom: 1.5rem;
}

.settings-form {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Карточка модели с просмотрами */
.model-card-stats {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-light);
}

.model-card-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Кнопка сохранения */
.model-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.model-actions .btn {
    flex: 1;
    min-width: 150px;
}

.btn.saved {
    background: var(--red-light);
    border-color: var(--red);
    color: var(--red);
}

/* Загрузка аватара */
.avatar-upload-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red-light), rgba(255, 107, 107, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    overflow: hidden;
    border: 3px solid var(--border);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Поле пароля с кнопкой показа */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
}

.password-toggle:hover {
    opacity: 1;
}

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .page {
        padding: 1rem;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 1rem;
        min-height: auto;
        gap: 2rem;
    }

    .hero-content h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-visual {
        display: none;
    }

    .navbar {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .nav-brand {
        font-size: 1.2rem;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .nav-actions .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .user-name {
        display: none;
    }

    .features {
        padding: 2rem 0;
    }

    .features h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .features-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .features-cube {
        order: -1;
    }

    .features-cube .floating-cube {
        width: 220px;
        height: 220px;
    }

    .features-cube .cube {
        width: 100px;
        height: 100px;
    }

    .features-cube .cube-face {
        width: 100px;
        height: 100px;
    }

    .features-cube .cube-face.front  { transform: translateZ(50px); }
    .features-cube .cube-face.back   { transform: rotateY(180deg) translateZ(50px); }
    .features-cube .cube-face.left   { transform: rotateY(-90deg) translateZ(50px); }
    .features-cube .cube-face.right  { transform: rotateY(90deg) translateZ(50px); }
    .features-cube .cube-face.top    { transform: rotateX(90deg) translateZ(50px); }
    .features-cube .cube-face.bottom { transform: rotateX(-90deg) translateZ(50px); }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        font-size: 2rem;
    }

    .popular-section, .catalog-header {
        padding: 1.5rem 0;
    }

    .popular-section h2, .catalog-header h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .models-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .model-image {
        height: 180px;
    }

    .catalog-filters {
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
    }

    .filter-group {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .filter-group select, .search-box input {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .upload-container {
        padding: 0;
    }

    .upload-form {
        padding: 1.5rem;
    }

    .model-detail {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1.5rem;
    }

    .model-preview .model-image {
        height: 250px;
    }

    .model-price-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .model-price-section .btn {
        width: 100%;
    }

    .model-actions .btn {
        width: 100%;
    }

    .profile-container {
        padding: 0;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }

    .profile-avatar-large {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .profile-stats {
        justify-content: center;
        gap: 1.5rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .profile-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .dashboard-user-info {
        flex-direction: column;
    }

    .dashboard-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .dashboard-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .dashboard-tabs {
        justify-content: center;
    }

    .dashboard-tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .creators-grid {
        grid-template-columns: 1fr;
    }

    .creator-card {
        padding: 1rem;
    }

    .notifications-panel {
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
        max-width: none;
    }

    .modal {
        width: 95%;
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    .btn-large {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }

    .nav-links {
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }

    .profile-stats {
        gap: 1rem;
    }

    .gradient-text {
        display: block;
    }
}

/* ===== Страница модерации ===== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 1.75rem;
}

.admin-stats {
    display: flex;
    gap: 1.5rem;
}

.admin-stat {
    text-align: center;
    padding: 0.75rem 1rem;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.admin-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.admin-stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
}

.pending-models {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pending-model-card {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.pending-model-preview {
    width: 120px;
    height: 90px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg);
}

.pending-model-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pending-model-preview .no-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-light);
}

.pending-model-info {
    flex: 1;
    min-width: 200px;
}

.pending-model-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.pending-model-author {
    font-size: 0.85rem;
    color: var(--text-light);
}

.pending-model-category {
    font-size: 0.75rem;
    color: var(--primary);
    margin-top: 0.25rem;
}

.pending-model-desc {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    line-height: 1.4;
}

.pending-model-date {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.pending-model-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
}

.pending-model-actions .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    min-width: 130px;
}

.pending-model-actions .btn svg {
    flex-shrink: 0;
}

.btn-success {
    background: var(--green);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: var(--red);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--text-light);
}

.no-pending {
    padding: 3rem;
}

.empty-state {
    text-align: center;
    color: var(--text-light);
}

.empty-state svg {
    margin-bottom: 1rem;
    color: var(--green);
}

.empty-state p {
    font-size: 1.1rem;
}

/* Модальное окно отклонения */
.reject-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 1rem;
}

.reject-modal {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border);
}

.reject-modal h3 {
    margin-bottom: 1rem;
}

.reject-modal textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.reject-modal textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.reject-modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

/* Мобильная адаптация модерации */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-stats {
        width: 100%;
        justify-content: center;
    }

    .pending-model-card {
        flex-direction: column;
    }

    .pending-model-preview {
        width: 100%;
        height: 150px;
    }

    .pending-model-info {
        min-width: 100%;
    }

    .pending-model-actions {
        flex-direction: row;
        width: 100%;
    }

    .pending-model-actions .btn {
        flex: 1;
    }

    .reject-modal-actions {
        flex-direction: column;
    }

    .reject-modal-actions .btn {
        width: 100%;
    }
}
