/* ============================================================
   MAZE HOST - ТЕМНЫЙ СТИЛЬ
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #161622;
    --bg-hover: #1c1c2e;
    --bg-input: #0d0d16;
    --border-color: #2a2a3e;
    --border-light: #3a3a52;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a82;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.25);
    --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --success: #34d399;
    --danger: #f87171;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    width: 92%;
    margin: 0 auto;
    padding: 24px 0;
    flex: 1;
}

/* ============================================================
   ХЕДЕР
   ============================================================ */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo .dot {
    color: var(--text-muted);
    font-weight: 300;
    -webkit-text-fill-color: var(--text-muted);
}

nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

nav a:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

nav a.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* ============================================================
   АВАТАРКА
   ============================================================ */
.avatar-wrapper {
    position: relative;
    cursor: pointer;
    margin-left: 4px;
}

.avatar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    background: var(--bg-card);
}

.avatar-btn:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}

.avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-menu {
    position: absolute;
    top: 52px;
    right: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow);
    z-index: 1000;
}

.dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-menu .user-info {
    padding: 12px 14px 14px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
}

.dropdown-menu .user-info .name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.dropdown-menu .user-info .role {
    font-size: 12px;
    color: var(--text-muted);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.dropdown-menu a .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.dropdown-menu a.logout {
    color: var(--danger);
    border-top: 1px solid var(--border-color);
    margin-top: 6px;
    padding-top: 12px;
}

.dropdown-menu a.logout:hover {
    background: rgba(248, 113, 113, 0.08);
}

/* ============================================================
   БАНЕР
   ============================================================ */
.banner {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    pointer-events: none;
}

.banner h1 {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.banner h1 .highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.banner p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
    max-width: 540px;
    position: relative;
    z-index: 1;
}

.banner .stats {
    display: flex;
    gap: 48px;
    margin-top: 28px;
    position: relative;
    z-index: 1;
}

.banner .stat-number {
    font-size: 28px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.banner .stat-label {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

/* ============================================================
   СЕТКА РАБОТ
   ============================================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.work-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.work-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-card:hover img {
    transform: scale(1.03);
}

.work-card .work-info {
    padding: 20px 22px 22px;
}

.work-card .work-info h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
}

.work-card .work-info p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.work-card .work-btn {
    padding: 8px 20px;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.work-card .work-btn:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 30px var(--accent-glow);
}

/* ============================================================
   КОНТАКТЫ
   ============================================================ */
.contacts-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 40px;
    margin-top: 48px;
    text-align: center;
}

.contacts-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.contact-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ============================================================
   МОДАЛКА
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    animation: modalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-box::-webkit-scrollbar {
    width: 4px;
}

.modal-box::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.modal-box::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

.modal-box .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 10;
}

.modal-box .modal-header h2 {
    font-size: 19px;
    font-weight: 700;
}

.modal-box .modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-hover);
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-box .modal-close:hover {
    background: var(--danger);
    color: #fff;
}

.modal-box .modal-body {
    padding: 24px;
}

.modal-box .modal-body img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.modal-box .modal-body .description {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.modal-box .modal-body .modal-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.modal-box .modal-body .modal-link:hover {
    transform: scale(1.03);
    box-shadow: 0 0 40px var(--accent-glow);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================================
   ПРОФИЛЬ - MAZE HOST СТИЛЬ
   ============================================================ */
.page-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 32px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title .badge-count {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 2px 12px;
    border-radius: 50px;
}

.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 14px;
}

.alert-success {
    background: rgba(52, 211, 153, 0.08);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.15);
}

.alert-error {
    background: rgba(248, 113, 113, 0.08);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.15);
}

.profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
}

/* Профиль - Левая колонка */
.profile-sidebar {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 24px;
    text-align: center;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    margin-bottom: 16px;
}

.profile-sidebar .name {
    font-size: 20px;
    font-weight: 700;
}

.profile-sidebar .role {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.profile-sidebar .status {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(52, 211, 153, 0.1);
    color: var(--success);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
}

.profile-sidebar .stat-item {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.profile-sidebar .stat-item .num {
    font-size: 24px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-sidebar .stat-item .label {
    color: var(--text-muted);
    font-size: 13px;
}

/* Профиль - Правая колонка (настройки) */
.profile-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 24px;
}

.settings-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.settings-card .card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.settings-card .card-header .edit-hint {
    color: var(--text-muted);
    font-size: 12px;
}

.settings-card input,
.settings-card input[type="password"],
.settings-card input[type="file"] {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.settings-card input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.settings-card input[type="file"] {
    padding: 8px;
}

.settings-card .btn {
    padding: 10px 24px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.settings-card .btn:hover {
    transform: scale(1.01);
    box-shadow: 0 0 30px var(--accent-glow);
}

.settings-card .btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.settings-card .btn-outline:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: none;
}

.settings-card .note {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 10px;
}

.settings-card .note.danger {
    color: var(--danger);
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.toggle-btn {
    padding: 8px 24px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.toggle-btn.on {
    background: rgba(52, 211, 153, 0.12);
    color: var(--success);
}

.toggle-btn.on:hover {
    background: rgba(52, 211, 153, 0.2);
}

.toggle-btn.off {
    background: rgba(248, 113, 113, 0.08);
    color: var(--danger);
}

.toggle-btn.off:hover {
    background: rgba(248, 113, 113, 0.15);
}

.toggle-status {
    color: var(--text-muted);
    font-size: 13px;
}

/* ============================================================
   АДМИН-ПАНЕЛЬ
   ============================================================ */
.admin-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 32px;
}

.admin-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.admin-form input,
.admin-form textarea {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.admin-form input:focus,
.admin-form textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.admin-form textarea {
    resize: vertical;
    min-height: 100px;
}

.admin-form .btn-submit {
    padding: 12px 32px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-form .btn-submit:hover {
    box-shadow: 0 0 40px var(--accent-glow);
}

.admin-list {
    margin-top: 32px;
}

.admin-list-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.admin-item:hover {
    background: var(--bg-secondary);
}

.admin-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-item-left img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.admin-item-left .item-title {
    font-weight: 600;
    font-size: 15px;
}

.admin-item-left .item-desc {
    color: var(--text-secondary);
    font-size: 13px;
}

.admin-item-actions {
    display: flex;
    gap: 8px;
}

.admin-item-actions a {
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease;
}

.admin-item-actions .edit-btn {
    color: var(--accent);
    border: 1px solid var(--accent);
}

.admin-item-actions .edit-btn:hover {
    background: var(--accent);
    color: #fff;
}

.admin-item-actions .delete-btn {
    color: var(--danger);
    border: 1px solid var(--danger);
}

.admin-item-actions .delete-btn:hover {
    background: var(--danger);
    color: #fff;
}

/* ============================================================
   РЕДАКТИРОВАНИЕ ПРОЕКТА
   ============================================================ */
.edit-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 32px;
}

.edit-section .back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
    transition: color 0.2s ease;
}

.edit-section .back-link:hover {
    color: var(--text-primary);
}

.edit-section .edit-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.edit-section .current-image {
    margin-bottom: 20px;
}

.edit-section .current-image img {
    max-width: 300px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

/* ============================================================
   РЕГИСТРАЦИЯ
   ============================================================ */
.register-btn {
    background: var(--accent-gradient);
    color: #fff !important;
    padding: 8px 20px !important;
    border-radius: 50px !important;
}

.register-btn:hover {
    box-shadow: 0 0 30px var(--accent-glow) !important;
}

.register-disabled {
    background: var(--bg-hover) !important;
    color: var(--danger) !important;
    cursor: not-allowed;
}

.register-disabled:hover {
    background: var(--bg-hover) !important;
    box-shadow: none !important;
}

.register-hint {
    position: absolute;
    background: rgba(248, 113, 113, 0.9);
    color: #fff;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 11px;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.register-btn:hover .register-hint {
    opacity: 1;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 992px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: stretch;
    }
    
    nav {
        justify-content: center;
    }
    
    .banner {
        padding: 28px 24px;
    }
    
    .banner h1 {
        font-size: 28px;
    }
    
    .banner .stats {
        gap: 24px;
    }
    
    .works-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .admin-item-actions {
        width: 100%;
    }
    
    .modal-box {
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 96%;
        padding: 12px 0;
    }
    
    .banner {
        padding: 20px 16px;
    }
    
    .banner h1 {
        font-size: 22px;
    }
    
    .banner .stat-number {
        font-size: 20px;
    }
    
    .avatar-btn {
        width: 34px;
        height: 34px;
    }
    
    .page-section,
    .admin-panel,
    .edit-section {
        padding: 20px;
    }
}

/* ============================================================
   КРАСИВАЯ МОДАЛКА ДЛЯ ПРОСМОТРА РАБОТ
   ============================================================ */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 620px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    animation: modalSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 60px var(--accent-glow);
}

.modal-box::-webkit-scrollbar {
    width: 4px;
}

.modal-box::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

.modal-box::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

/* ХЕДЕР МОДАЛКИ */
.modal-box .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 10;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-box .modal-header .modal-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.modal-box .modal-header .modal-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 14px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    border-radius: 50px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    -webkit-text-fill-color: var(--accent);
}

.modal-box .modal-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-hover);
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box .modal-close:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
    transform: rotate(90deg);
}

/* ТЕЛО МОДАЛКИ */
.modal-box .modal-body {
    padding: 24px;
}

.modal-box .modal-body .modal-image {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 20px;
    max-height: 340px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.modal-box .modal-body .modal-description {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.modal-box .modal-body .modal-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.modal-box .modal-body .modal-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
}

.modal-box .modal-body .modal-meta .meta-item .meta-icon {
    font-size: 16px;
}

.modal-box .modal-body .modal-meta .meta-item .meta-value {
    color: var(--text-primary);
    font-weight: 500;
}

.modal-box .modal-body .modal-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 32px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.modal-box .modal-body .modal-link:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 40px var(--accent-glow);
}

.modal-box .modal-body .modal-link .link-arrow {
    transition: transform 0.3s ease;
}

.modal-box .modal-body .modal-link:hover .link-arrow {
    transform: translateX(4px);
}

/* ФУТЕР МОДАЛКИ */
.modal-box .modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.modal-box .modal-footer .footer-text {
    color: var(--text-muted);
    font-size: 12px;
}

.modal-box .modal-footer .footer-text span {
    color: var(--text-secondary);
}

.modal-box .modal-footer .footer-close-btn {
    padding: 8px 24px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-box .modal-footer .footer-close-btn:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

/* АНИМАЦИЯ МОДАЛКИ */
@keyframes modalSlide {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ============================================================
   БЕЙДЖИКИ ДЛЯ КАРТОЧЕК
   ============================================================ */
.work-card .work-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.work-card .work-tags .tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 12px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent);
    border-radius: 50px;
    border: 1px solid rgba(99, 102, 241, 0.08);
}

/* ============================================================
   КАРТОЧКА РАБОТЫ - НОВЫЙ СТИЛЬ
   ============================================================ */
.work-card .work-info .work-date {
    color: var(--text-muted);
    font-size: 11px;
    margin-bottom: 8px;
}

/* ============================================================
   АДАПТИВ ДЛЯ МОДАЛКИ
   ============================================================ */
@media (max-width: 640px) {
    .modal-box {
        max-width: 100%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-box .modal-header .modal-title {
        font-size: 17px;
    }
    
    .modal-box .modal-body .modal-image {
        max-height: 200px;
    }
    
    .modal-box .modal-body .modal-description {
        font-size: 14px;
    }
    
    .modal-box .modal-footer {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 400px) {
    .modal-box .modal-header {
        padding: 14px 16px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .modal-box .modal-body {
        padding: 16px;
    }
    
    .modal-box .modal-body .modal-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* ============================================================
   СТАТУСЫ ПРОЕКТОВ
   ============================================================ */

/* Бейдж на карточке */
.status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    letter-spacing: 0.3px;
}

.status-badge.status-active {
    border-color: #34d399;
    color: #34d399;
}

.status-badge.status-developing {
    border-color: #fbbf24;
    color: #fbbf24;
}

.status-badge.status-completed {
    border-color: #60a5fa;
    color: #60a5fa;
}

/* Цвета статусов в модалке */
.modal-status-active {
    color: #34d399 !important;
}

.modal-status-developing {
    color: #fbbf24 !important;
}

.modal-status-completed {
    color: #60a5fa !important;
}

/* Статус в админке */
.admin-status {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
}

.admin-status.active {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
}

.admin-status.developing {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.admin-status.completed {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}