/* ============================================================
   media/files/css.css — стили медиа-центра
   ============================================================ */

/* ===== СБРОС СТИЛЕЙ ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    color: #e2e8f0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 30px 20px;
}

/* ===== КОНТЕЙНЕР ===== */
.container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

/* ===== НАВИГАЦИЯ ===== */
.nav-links {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 30px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-link:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(96, 165, 250, 0.3);
    color: #60a5fa;
    transform: translateX(-4px);
}

/* ===== ЗАГОЛОВОК ===== */
.header {
    text-align: center;
    margin-bottom: 50px;
}

.header .logo {
    font-size: 4rem;
    margin-bottom: 12px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.header p {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 500px;
    margin: 0 auto;
}

.header-note {
    margin-top: 16px;
    font-size: 0.85rem;
    color: #64748b;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    padding: 10px 18px;
    background: rgba(96, 165, 250, 0.06);
    border-left: 3px solid rgba(96, 165, 250, 0.4);
    border-radius: 8px;
    line-height: 1.5;
    text-align: left;
}

.header-note strong {
    color: #93c5fd;
}

/* ===== СТАТИСТИКА ===== */
.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 24px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-item .value {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-item .label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ============================================================
   ===== СЕТКА И КАРТОЧКИ РАЗДЕЛОВ =====
   ============================================================ */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 24px;
    padding: 32px 28px;
    text-decoration: none;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #60a5fa, #a78bfa, #f472b6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 
        0 20px 40px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(96, 165, 250, 0.2),
        0 0 60px -20px rgba(96, 165, 250, 0.5);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card.disabled {
    cursor: not-allowed;
    opacity: 0.75;
    filter: grayscale(0.3);
}

.project-card.disabled:hover {
    transform: none;
    border-color: rgba(148, 163, 184, 0.15);
    box-shadow: none;
}

.project-card.disabled:hover::before {
    opacity: 0;
}

.project-card.disabled:hover .icon-wrapper {
    transform: none;
}

.project-card.disabled:hover .arrow .arrow-icon {
    transform: none;
}

.project-card.disabled .arrow {
    color: #64748b;
}

.project-card.disabled .arrow .arrow-icon {
    font-size: 1rem;
}

.project-card .card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.project-card .icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(167, 139, 250, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    border: 1px solid rgba(96, 165, 250, 0.2);
    transition: transform 0.3s ease;
}

.project-card:hover .icon-wrapper {
    transform: scale(1.08) rotate(-5deg);
}

.project-card .status {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    white-space: nowrap;
}

.project-card .status.coming {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.3);
}

.project-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.02em;
}

.project-card .desc {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
}

.project-card .tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.project-card .tag {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(96, 165, 250, 0.1);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.2);
    font-weight: 500;
}

.project-card .arrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    font-size: 0.85rem;
    color: #60a5fa;
    font-weight: 600;
}

.project-card .arrow .arrow-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.project-card:hover .arrow .arrow-icon {
    transform: translateX(6px);
}

/* ============================================================
   ===== ФОРМА ЗАГРУЗКИ =====
   ============================================================ */

.drop-zone {
    border: 2px dashed rgba(96, 165, 250, 0.3);
    border-radius: 24px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: rgba(30, 41, 59, 0.5);
    margin-bottom: 24px;
}

.drop-zone:hover {
    border-color: rgba(96, 165, 250, 0.6);
    background: rgba(30, 41, 59, 0.7);
}

.drop-zone.dragover {
    border-color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
    transform: scale(1.01);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
}

.drop-zone svg {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px;
    max-height: 48px;
    color: #60a5fa;
    margin: 0 auto 12px auto;
    display: block;
}

.drop-zone p {
    font-size: 1.1rem;
    color: #f1f5f9;
    font-weight: 500;
    margin-bottom: 8px;
}

.drop-zone span {
    color: #60a5fa;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.drop-zone small {
    display: block;
    margin-top: 8px;
    color: #94a3b8;
    font-size: 0.85rem;
}

#fileInput {
    display: none;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.actions .btn {
    flex-shrink: 0;
}

/* ===== ОБЁРТКА СПИСКА ФАЙЛОВ ===== */
.file-list-wrapper {
    position: relative;
    margin: 16px 0 20px;
    min-height: 80px;
}

/* ===== СПИСОК ФАЙЛОВ ===== */
.file-list-container {
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    padding: 12px 16px;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(8px);
    display: none;
}

.file-list-container.visible {
    display: block;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    font-size: 0.85rem;
    color: #94a3b8;
}

.file-list-header strong {
    color: #f1f5f9;
}

.btn-clear-small {
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: 0.2s;
    font-weight: 500;
    font-family: inherit;
}

.btn-clear-small:hover {
    background: rgba(248, 113, 113, 0.1);
}

/* ===== ШАПКА ТАБЛИЦЫ ===== */
.file-list-table-header {
    display: flex;
    padding: 6px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    margin-bottom: 4px;
    gap: 8px;
}

.file-list-table-header .col-name {
    flex: 2;
    min-width: 120px;
}

.file-list-table-header .col-size {
    flex: 0 0 100px;
    text-align: right;
}

.file-list-table-header .col-estimated {
    flex: 0 0 120px;
    text-align: right;
}

.file-list-table-header .col-action {
    flex: 0 0 30px;
    text-align: center;
}

/* ===== СПИСОК ===== */
.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    color: #e2e8f0;
}

.file-list li {
    padding: 6px 8px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.05);
    gap: 8px;
    flex-wrap: wrap;
}

.file-list li:last-child {
    border-bottom: none;
}

.file-list li .file-name {
    flex: 2;
    min-width: 120px;
    color: #f1f5f9;
}

.file-list li .file-size {
    color: #94a3b8;
    font-size: 0.75rem;
    white-space: nowrap;
    flex: 0 0 100px;
    text-align: right;
}

.file-list li .file-estimated {
    color: #4ade80;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex: 0 0 120px;
    text-align: right;
    background: rgba(34, 197, 94, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
}

.file-list li .file-remove {
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    transition: 0.2s;
    flex: 0 0 30px;
    text-align: center;
}

.file-list li .file-remove:hover {
    background: rgba(248, 113, 113, 0.15);
}

.file-list li:hover {
    background: rgba(148, 163, 184, 0.05);
}

/* ===== ИТОГОВАЯ СТРОКА ===== */
.file-list-footer {
    display: flex;
    padding: 10px 8px 4px 8px;
    margin-top: 8px;
    border-top: 2px solid rgba(96, 165, 250, 0.2);
    font-size: 0.8rem;
    font-weight: 600;
    color: #f1f5f9;
    gap: 8px;
    align-items: center;
}

.file-list-footer .footer-label {
    flex: 2;
    min-width: 120px;
}

.file-list-footer .footer-count {
    flex: 0 0 100px;
    text-align: right;
    color: #60a5fa;
}

.file-list-footer .footer-size {
    flex: 0 0 100px;
    text-align: right;
    color: #94a3b8;
}

.file-list-footer .footer-estimated {
    flex: 0 0 120px;
    text-align: right;
    color: #4ade80;
}

.file-list-footer .footer-action {
    flex: 0 0 30px;
}

/* ===== ОВЕРЛЕЙ ЗАГРУЗКИ ===== */
.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 20px;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.upload-overlay.active {
    display: flex;
}

.upload-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(96, 165, 250, 0.15);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

.upload-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 6px;
}

.upload-progress-text {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ===== СТАТУС ===== */
.status {
    margin-top: 22px;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.5);
    font-size: 0.9rem;
    color: #bfdbfe;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border-left: 4px solid #60a5fa;
}

.status.success {
    border-left-color: #4ade80;
    background: rgba(34, 197, 94, 0.1);
    color: #bbf7d0;
}

.status.error {
    border-left-color: #f87171;
    background: rgba(220, 38, 38, 0.1);
    color: #fecaca;
}

/* ============================================================
   ===== РЕЗУЛЬТАТ ЗАГРУЗКИ =====
   ============================================================ */

.result-container {
    animation: fadeIn 0.5s ease;
}

.result {
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 16px;
    border-left: 4px solid #60a5fa;
    background: rgba(30, 41, 59, 0.5);
    color: #bfdbfe;
    font-size: 0.9rem;
    line-height: 1.6;
}

.result.success {
    border-left-color: #4ade80;
    background: rgba(34, 197, 94, 0.1);
    color: #bbf7d0;
}

.result.error {
    border-left-color: #f87171;
    background: rgba(220, 38, 38, 0.1);
    color: #fecaca;
}

.result.warning {
    border-left-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    color: #fde68a;
}

.result.info {
    border-left-color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
    color: #bfdbfe;
}

.result strong {
    color: #f1f5f9;
    font-weight: 700;
}

.result ul.file-list {
    margin: 10px 0;
    padding: 0;
    list-style: none;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.result ul.file-list li {
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.4);
    margin: 4px 0;
    border-radius: 8px;
    color: #e2e8f0;
    display: block;
}

.result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* ============================================================
   ===== КНОПКИ =====
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: white;
    box-shadow: 0 4px 14px -4px rgba(96, 165, 250, 0.5);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -6px rgba(96, 165, 250, 0.6);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
}

.btn-outline:hover {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.5);
    color: #f1f5f9;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
   ===== БЕЙДЖИ =====
   ============================================================ */

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge-warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.badge-danger {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

/* ============================================================
   ===== ГАЛЕРЕЯ ФОТО =====
   ============================================================ */

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.gallery-header .info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.gallery-header .info .count {
    font-size: 0.9rem;
    color: #94a3b8;
}

.gallery-header .info .count strong {
    color: #f1f5f9;
}

.gallery-header .actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.gallery-header .actions .select-all-btn {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid #60a5fa;
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #60a5fa;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}

.gallery-header .actions .select-all-btn:hover {
    background: #60a5fa;
    color: white;
}

.gallery-header .actions .delete-selected-btn {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid #f87171;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #f87171;
    cursor: pointer;
    transition: 0.2s;
    display: none;
    font-family: inherit;
}

.gallery-header .actions .delete-selected-btn:hover {
    background: #f87171;
    color: white;
}

.gallery-header .actions .delete-selected-btn.visible {
    display: inline-flex;
}

.gallery-header .actions .download-selected-btn {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid #4ade80;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4ade80;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.gallery-header .actions .download-selected-btn:hover {
    background: #4ade80;
    color: #0f172a;
}

/* ===== СЕТКА ГАЛЕРЕИ ===== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.gallery-item {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: 0.3s;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.gallery-item.selected {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
}

.gallery-item .image-wrapper {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item .image-wrapper img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    transition: 0.3s;
}

.gallery-item:hover .image-wrapper img {
    transform: scale(1.03);
}

.gallery-item .image-wrapper .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    opacity: 0;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px;
}

.gallery-item:hover .image-wrapper .overlay {
    opacity: 1;
}

.gallery-item .image-wrapper .overlay .view-btn {
    background: white;
    border: none;
    padding: 8px 16px;
    border-radius: 40px;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.8rem;
    font-family: inherit;
}

.gallery-item .image-wrapper .overlay .view-btn:hover {
    transform: scale(1.05);
}

.gallery-item .image-wrapper .overlay .rotate-btn {
    background: rgba(30, 41, 59, 0.9);
    border: none;
    padding: 8px 14px;
    border-radius: 40px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.8rem;
    font-family: inherit;
}

.gallery-item .image-wrapper .overlay .rotate-btn:hover {
    background: #1e293b;
    transform: scale(1.05);
}

.gallery-item .checkbox-container {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
}

.gallery-item .checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #60a5fa;
    border-radius: 4px;
}

.gallery-item .info {
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30, 41, 59, 0.9);
}

.gallery-item .info .file-info {
    flex: 1;
    min-width: 0;
}

.gallery-item .info .file-info .name {
    font-size: 0.75rem;
    font-weight: 500;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item .info .file-info .size {
    font-size: 0.65rem;
    color: #94a3b8;
}

.gallery-item .info .single-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.gallery-item .info .single-actions button,
.gallery-item .info .single-actions .download-btn {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.gallery-item .info .single-actions .rotate-icon {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

.gallery-item .info .single-actions .rotate-icon:hover {
    background: #60a5fa;
    color: white;
}

.gallery-item .info .single-actions .delete-icon {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.gallery-item .info .single-actions .delete-icon:hover {
    background: #f87171;
    color: white;
}

.gallery-item .info .single-actions .download-btn {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.gallery-item .info .single-actions .download-btn:hover {
    background: #4ade80;
    color: #0f172a;
}

/* ===== ПУСТАЯ ГАЛЕРЕЯ ===== */
.empty {
    text-align: center;
    padding: 80px 20px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 24px;
    border: 2px dashed rgba(148, 163, 184, 0.2);
}

.empty .icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty h3 {
    color: #f1f5f9;
    margin-bottom: 8px;
    font-size: 1.4rem;
}

.empty p {
    color: #94a3b8;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 40px;
    backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
}

.modal img {
    max-width: 90%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.modal .close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal .close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal .modal-nav {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
}

.modal .modal-nav button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    font-family: inherit;
}

.modal .modal-nav button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal .modal-rotate-btn {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(96, 165, 250, 0.8);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: 0.3s;
    backdrop-filter: blur(4px);
    font-family: inherit;
}

.modal .modal-rotate-btn:hover {
    background: #60a5fa;
    transform: translateX(-50%) scale(1.05);
}

/* ============================================================
   ===== ФУТЕР — ЖЁСТКОЕ ЦЕНТРИРОВАНИЕ =====
   ============================================================ */

.footer {
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    margin: 60px auto 0 auto !important;
    padding: 30px 0 0 0 !important;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    color: #64748b;
    font-size: 0.85rem;
}

.footer p {
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    display: block !important;
}

/* ============================================================
   ===== АНИМАЦИИ =====
   ============================================================ */

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ===== СКРОЛЛБАР =====
   ============================================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

::selection {
    background: rgba(96, 165, 250, 0.3);
    color: #f1f5f9;
}

/* ============================================================
   ===== АДАПТИВ =====
   ============================================================ */

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .header .logo {
        font-size: 3rem;
    }
    
    .container {
        padding: 0;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .gallery-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .gallery-header .info {
        justify-content: center;
    }
    
    .gallery-header .actions {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .project-card {
        padding: 24px 20px;
        border-radius: 20px;
    }
    
    .project-card h3 {
        font-size: 1.2rem;
    }
    
    .stats {
        gap: 24px;
        padding: 20px;
    }
    
    .stat-item .value {
        font-size: 1.5rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .modal {
        padding: 16px;
    }
    
    .modal .close-modal {
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 1.8rem;
    }
    
    .modal .modal-nav {
        bottom: 20px;
        gap: 8px;
    }
    
    .modal .modal-nav button {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .modal .modal-rotate-btn {
        bottom: 80px;
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .gallery-item .image-wrapper .overlay {
        opacity: 1;
        background: rgba(15, 23, 42, 0.3);
    }
    
    .gallery-item .image-wrapper .overlay .view-btn,
    .gallery-item .image-wrapper .overlay .rotate-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
}