/*  ТЁМАНАЯ ТЕМА ОБЩИЕ СТИЛИ */
h3 {font-size:16px !important; font-weight: bold; color: #cc0033; line-height:16px !important;}
h2 {font-size:16px !important; font-weight: bold; color: #f70000; line-height:16px !important;}
h1 {font-size:12px !important; font-weight: bold; text-align: center; color: #f70000; margin: 2px; line-height:14px !important;}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background: #0a0a1a;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12pt;
    line-height: 10pt;
    color: #ddd;
}
#all {
    max-width: 1000px;
    margin: 0 auto;
    background: linear-gradient(180deg, #0f0f2a 0%, #1a1a3e 100%);
    padding: 0 10px;
    color: #ddd;
}

/* ШАПКА С ЛОГОТИПОМ */
.header-bg {
    position: relative;
    width: 100%;
    height: 165px;
    background: url('https://zloyelvis.ru/images/logo.gif') center / cover no-repeat;
    display: block;
}

/* ===== СЧЁТЧИК ПОСЕТИТЕЛЕЙ ===== */
.counter {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #fff;
    font-size: 8pt;
    line-height: 1.0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    font-weight: bold;
    z-index: 10;
    background: rgba(180, 0, 0, 0.65);
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid rgba(255, 50, 50, 0.5);
}

.logoheader {
    text-align: center;
    padding: 0px 0;
}
.logoheader a {
    color: #4488ff;
    text-decoration: none;
    font-weight: bold;
}

/*  БЕГУЩАЯ СТРОКА  */
.marquee-text {
    animation: blinkGradient 6s infinite;
    padding: 0px 0;
    font-size: 10pt;
    font-weight: bold;
    color: #ffffff;
    line-height: 1.5;
    overflow: visible;
    height: auto;
}
.marquee-text marquee {
    display: block;
    height: auto;
    line-height: inherit;
    padding: 0;
    margin: 0;
    vertical-align: baseline;
}
@keyframes blinkGradient {
    0%   { background: linear-gradient(90deg, #8b0000, #00008b); }
    25%  { background: linear-gradient(90deg, #cc0000, #0033cc); }
    50%  { background: linear-gradient(90deg, #0033cc, #cc0000); }
    75%  { background: linear-gradient(90deg, #00008b, #8b0000); }
    100% { background: linear-gradient(90deg, #cc0000, #00008b); }
}

hr {
    border: 0;
    height: 2px;
    background: linear-gradient(90deg, #cc0000, #0033cc, #cc0000);
    margin: 10px 0;
}

/*  МЕНЮ – КНОПКИ  */
.menu {
    text-align: center;
    padding: 5px 0;
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 25px;
}
.menu a {
    display: inline-block;
    padding: 8px 10px;
    background: linear-gradient(135deg, #8b0000, #0033cc);
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 10pt;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 1px;
}
.menu a:hover {
    background: linear-gradient(135deg, #cc0000, #0044ff);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(204, 0, 0, 0.5);
    color: #ffffff;
}
@media screen and (max-width: 768px) {
    .menu {
        flex-wrap: wrap;
        gap: 15px;
    }
    .menu a {
        padding: 8px 16px;
        font-size: 10pt;
    }
}
@media screen and (max-width: 400px) {
    .menu {
        flex-wrap: wrap;
        gap: 8px;
    }
    .menu a {
        padding: 6px 12px;
        font-size: 10pt;
    }
}

.content {
    padding: 5px 0;
}
.content table {
    width: 100%;
    border-collapse: collapse;
}
.content td {
    padding: 12px 5px;
    vertical-align: top;
}
.content td b {
    font-size: 12pt;
}
.content img {
    max-width: 100%;
    height: auto;
}
.social-links {
    font-size: 11pt;
    line-height: 22pt;
}
.social-links img {
    vertical-align: middle;
}
a { color: #4488ff; }
a:hover { color: #ff3333; }
h2 { font-size: 18pt; margin-bottom: 15px; }

.download-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.download-table th,
.download-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #333;
    text-align: left;
    vertical-align: top;
}
.download-table th {
    background: linear-gradient(135deg, #8b0000, #0033cc);
    color: #fff;
    font-weight: bold;
    font-size: 12pt;
}
.download-table td:first-child {
    width: 40%;
    font-weight: bold;
}
.download-table a {
    color: #4488ff;
    word-break: break-all;
}
.download-table a:hover {
    color: #ff3333;
}
.download-table .fname {
    font-weight: bold;
}

/* СЕТКА ВИДЕО  */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 2px 0;
    width: 100%;
    overflow: hidden;
}
.video-item {
    background: linear-gradient(135deg, #1a1a3e, #0f0f2a);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 12px rgba(139, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid #2a1a3e;
}
.video-item h3 {
    font-size: 16px;
    line-height: 1.2;
    margin: 0 0 10px 0;
    color: #ff4444;
}
.video-item p {
    font-size: 14px;
    line-height: 1.2;
    color: #bbb;
    margin: 0 0 12px 0;
    flex-grow: 1;
}
.video-item a {
    display: block;
    text-align: center;
}
.video-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    max-width: 100%;
}
.video-item p a {
    word-break: break-all;
    overflow-wrap: break-word;
    display: inline;
}
.video-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 100%;
}

@media screen and (max-width: 768px) {
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .video-item:last-child:nth-child(odd) {
        grid-column: auto;
        max-width: 100%;
    }
    .video-item {
        padding: 12px;
    }
    .video-item h3 {
        font-size: 15px;
    }
    .video-item p {
        font-size: 13px;
    }
    #all {
        padding: 0 8px;
    }
    .header-bg {
        height: 82px;
    }
}

/*ZEVS ARENA */
body:has(#game-area) #all {
    max-width: 100% !important;
    padding: 0 10px;
    background: #0a0a1a;
    color: #ccc;
}
body:has(#game-area) #all header {
    max-width: 1000px;
    margin: 0 auto;
}

.content { padding: 10px 0; }
#game-container { display: flex; flex-direction: column; align-items: center; }

#game-area { display: flex; justify-content: center; align-items: flex-start; gap: 1px; width: 100%; max-width: 1320px; padding: 0 5px; overflow-x: hidden; }
.records-col { width: 250px; flex-shrink: 0; }
#records-panel { background: linear-gradient(180deg, #0f0f2a, #1a0a2a); border-radius: 8px; padding: 12px; color: #fff; font-size: 13px; box-shadow: 0 4px 12px rgba(139,0,0,0.4); border: 1px solid #2a1a3e; }
#records-panel h3 { margin: 0 0 10px; font-size: 16px; color: #ff3333; text-align: center; text-shadow: 0 0 10px rgba(255,0,0,0.3); }
.records-table { width:100%; border-collapse:collapse; margin-bottom:15px; }
.records-table th, .records-table td { border-bottom:1px solid #333; padding:3px 5px; font-size:12px; }
.records-table th { color:#4488ff; }
.last-games-title { font-weight:bold; color:#ff3333; margin:10px 0 5px; font-size:14px; text-shadow: 0 0 8px rgba(255,0,0,0.3); }

.canvas-col { width: 840px; flex-shrink: 0; position: relative; display: flex; flex-direction: column; align-items: stretch; }
#game-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    padding: 0 10px;
    box-sizing: border-box;
    color: #fff;
    background: linear-gradient(90deg, #0a0a2a, #1a001a);
    border-radius: 4px 4px 0 0;
}
#timer { font-size:32px; font-weight:bold; color: #ff4444; text-shadow: 0 0 15px rgba(255,0,0,0.4); }
#score-block { display:flex; align-items:center; gap:1px; }
#ui { font-size:24px; }
#clear-record { background: #1a1a4e; border: 1px solid #3333aa; border-radius:4px; padding:4px 8px; cursor:pointer; font-size:16px; color:#4488ff; }
#clear-record:hover { background: #2a2a6e; border-color: #4488ff; }

canvas { border: 2px solid #1a1a4e; background: #0a0a1a; cursor: crosshair; box-shadow: 0 0 15px rgba(0,0,100,0.3); }

.stats-col { width: 220px; flex-shrink: 0; display: flex; flex-direction: column; gap: 1px; }
#stats-panel { background: linear-gradient(180deg, #0f0f2a, #1a0a2a); padding: 12px; border-radius: 6px; color: white; font-size: 14px; border: 1px solid #2a1a3e; }
#stats-panel .title { font-weight:bold; color:#ff3333; margin-top:8px; text-shadow: 0 0 8px rgba(255,0,0,0.3); }
#weapon-label { color:#8888cc; font-size:12px; }
#weapon-panel { display: flex; gap: 1px; background: #0f0f2a; padding: 8px; border-radius: 6px; border: 1px solid #2a1a3e; }
.weapon-icon { width: 48px; height: 48px; display: flex; align-items:center; justify-content:center; font-size: 24px; background: #1a1a3e; border-radius:6px; cursor:pointer; border:2px solid transparent; transition: all 0.2s; }
.weapon-icon:hover { background: #2a1a4e; }
.weapon-icon.active { border-color:#ff3333; background:#2a0a1e; box-shadow: 0 0 10px rgba(255,0,0,0.4); }
#builder-panel { background: #0f0f2a; padding: 8px 12px; border-radius: 6px; color: white; font-size: 14px; display: flex; align-items: center; gap: 1px; border: 1px solid #2a1a3e; }
#builder-panel .block-icon { font-size:24px; }
#builder-panel .block-count { font-weight:bold; color: #4488ff; }
#builder-panel .hint { font-size:11px; color:#8888cc; }

#autoturn-panel { background: #0f0f2a; padding: 10px 12px; border-radius: 6px; color: white; font-size: 13px; border: 1px solid #2a1a3e; }
#autoturn-panel .title { font-weight:bold; color:#ff3333; margin-bottom:6px; text-shadow: 0 0 8px rgba(255,0,0,0.3); }
#autoturn-panel label { display: block; margin: 2px 0; cursor: pointer; }
#autoturn-panel input[type="radio"] { margin-right: 4px; accent-color: #ff3333; }

#game-over-overlay {
    display: none;
    position: absolute; top:0; left:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.85);
    z-index: 20;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#game-over-overlay > div {
    background: linear-gradient(135deg, #0a0a2a, #1a001a);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    color: white;
    border: 1px solid #3333aa;
    box-shadow: 0 0 30px rgba(0,0,100,0.3);
}
.game-over-title {
    color: #ff2222;
    font-size: 36px;
    font-weight: bold;
    margin: 0 0 20px;
    text-shadow: 0 0 20px rgba(255,0,0,0.5);
}
#nick-input {
    padding: 10px; font-size:18px; width:200px; text-align:center;
    border-radius:6px; border:1px solid #3333aa; background:#0a0a2a; color:#fff;
}
.btn-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}
#save-btn, #cancel-btn {
    padding: 10px 30px;
    font-size:18px;
    cursor:pointer;
    border:none;
    border-radius:6px;
    color:white;
}
#save-btn { background: linear-gradient(135deg, #0033cc, #0044ff); }
#save-btn:hover { background: linear-gradient(135deg, #0044ff, #0055ff); box-shadow: 0 0 15px rgba(0,68,255,0.4); }
#save-btn:disabled { background:#333; }
#cancel-btn { background: linear-gradient(135deg, #8b0000, #cc0000); }
#cancel-btn:hover { background: linear-gradient(135deg, #cc0000, #ff0000); }
#save-error { color:#ff4444; margin-top:10px; }

/* ZEVS GENERATOR PHP */
#all .content .zevs-container {
    font-family: system-ui, sans-serif;
    color: #ddd;
}
#all .content .zevs-container .zevs-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 15px;
    width: 100%;
}
#all .content .zevs-container .panel {
    background: linear-gradient(135deg, #0f0f2a, #1a0a2a);
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(139,0,0,0.2);
    overflow-y: auto;
    border: 1px solid #2a1a3e;
}
#all .content .zevs-container .panel h2 {
    margin: 0 0 11px 0;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ff3333;
}
#all .content .zevs-container .row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    align-items: flex-end;
}
#all .content .zevs-container .row > div { flex: 1; }
#all .content .zevs-container label {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: #6699ff;
    display: block;
    margin-bottom: 2px;
}
#all .content .zevs-container input[type="number"],
#all .content .zevs-container select,
#all .content .zevs-container button {
    padding: 2px;
    border: 1px solid #3333aa;
    border-radius: 4px;
    width: 100%;
    font-size: 12px;
    box-sizing: border-box;
    background: #0a0a2a;
    color: #ddd;
}
#all .content .zevs-container #palette-list {
    list-style: none;
    padding: 0;
    margin: 5px 0;
}
#all .content .zevs-container .palette-item {
    background: #0a0a2a;
    border: 1px solid #3333aa;
    border-radius: 6px;
    margin-bottom: 4px;
    padding: 6px 8px;
    cursor: grab;
    position: relative;
}
#all .content .zevs-container .item-main {
    display: flex;
    align-items: center;
    gap: 8px;
}
#all .content .zevs-container .drag-handle {
    color: #6666aa;
    font-size: 16px;
    cursor: grab;
}
#all .content .zevs-container .palette-item input[type="color"] {
    width: 24px;
    height: 24px;
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
}
#all .content .zevs-container .layer-info {
    flex-grow: 1;
    font-size: 11px;
    font-weight: bold;
    color: #aaa;
}
#all .content .zevs-container .btn-del {
    background: #2a0a0a;
    color: #ff4444;
    border: 1px solid #4a1a1a;
    border-radius: 4px;
    width: 22px !important;
    height: 22px;
    padding: 0 !important;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#all .content .zevs-container .btn-del:hover { background: #3a1a1a; }
#all .content .zevs-container .btn-del:disabled { opacity: 0.3; cursor: not-allowed; }
#all .content .zevs-container .range-box {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}
#all .content .zevs-container .range-box input {
    flex-grow: 1;
    height: 4px;
    cursor: pointer;
    accent-color: #4488ff;
}
#all .content .zevs-container .range-val {
    font-size: 14px;
    font-weight: bold;
    color: #6699ff;
    min-width: 24px;
    text-align: right;
}
#all .content .zevs-container .btn-main {
    background: linear-gradient(135deg, #0033cc, #0044ff);
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    padding: 10px !important;
    margin-top: 5px;
    border-radius: 4px;
}
#all .content .zevs-container .btn-main:hover { background: linear-gradient(135deg, #0044ff, #0055ff); box-shadow: 0 0 10px rgba(0,68,255,0.4); }
#all .content .zevs-container .btn-main:disabled { background: #333; }
#all .content .zevs-container .preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    justify-content: center;
}
#all .content .zevs-container .canvas-container {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1;
    border: 1px solid #3333aa;
    border-radius: 8px;
    background: #0a0a1a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0,0,100,0.2);
}
#all .content .zevs-container canvas {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}
#all .content .zevs-container .canvas-label {
    font-size: 15px;
    font-weight: bold;
    color: #ff4444;
    margin-bottom: 2px;
    text-align: center;
    text-shadow: 0 0 8px rgba(255,0,0,0.3);
}
#all .content .zevs-container .stats {
    font-size: 12px;
    color: #6699ff;
    margin-top: 4px;
    text-align: center;
}
#all .content .zevs-container .settings-group {
    background: #0a0a2a;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #3333aa;
    margin-bottom: 8px;
}
#all .content .zevs-container .settings-title {
    font-size: 14px;
    font-weight: bold;
    color: #ff3333;
    margin-bottom: 6px;
    border-bottom: 1px solid #333;
    padding-bottom: 4px;
    text-shadow: 0 0 8px rgba(255,0,0,0.3);
}
@media screen and (max-width: 768px) {
    #all .content .zevs-container .zevs-grid {
        grid-template-columns: 1fr;
    }
}

/*ZEVS Generator HTML */
:root { --primary: #0044ff; --bg: #0a0a1a; --text: #ddd; }
body.zevs-html { 
    font-family: system-ui, sans-serif; 
    background: linear-gradient(135deg, #8b0000 0%, #0033cc 100%);
    color: var(--text); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 5px; 
    margin: 0;
    min-height: 100vh;
}
.zevs-html .container { display: grid; grid-template-columns: 360px 1fr; gap: 15px; max-width: 1300px; width: 100%; height: 98vh; }
.zevs-html .panel { background: linear-gradient(135deg, #0f0f2a, #1a0a2a); padding: 12px; border-radius: 12px; box-shadow: 0 4px 15px rgba(139,0,0,0.3); overflow-y: auto; border: 1px solid #2a1a3e; }

.zevs-html h2 { margin: 0 0 11px 0; font-size: 16px; display: flex; justify-content: space-between; align-items: center; color: #ff3333; }
.zevs-html .row { display: flex; gap: 8px; margin-bottom: 6px; align-items: flex-end; }
.zevs-html .row > div { flex: 1; }
.zevs-html label { font-size: 12px; font-weight: bold; text-transform: uppercase; color: #6699ff; display: block; margin-bottom: 2px; }
.zevs-html input[type="number"], .zevs-html select, .zevs-html button { padding: 2px; border: 1px solid #3333aa; border-radius: 4px; width: 100%; font-size: 12px; box-sizing: border-box; background: #0a0a2a; color: #ddd; }

.zevs-html #palette-list { list-style: none; padding: 0; margin: 5px 0; }
.zevs-html .palette-item { background: #0a0a2a; border: 1px solid #3333aa; border-radius: 6px; margin-bottom: 4px; padding: 6px 8px; cursor: grab; position: relative; }
.zevs-html .item-main { display: flex; align-items: center; gap: 8px; }
.zevs-html .drag-handle { color: #6666aa; font-size: 16px; cursor: grab; }
.zevs-html .palette-item input[type="color"] { width: 24px; height: 24px; border: none; padding: 0; background: none; cursor: pointer; }
.zevs-html .layer-info { flex-grow: 1; font-size: 11px; font-weight: bold; color: #aaa; }

.zevs-html .btn-del { 
    background: #2a0a0a; color: #ff4444; border: 1px solid #4a1a1a; 
    border-radius: 4px; width: 22px !important; height: 22px; 
    padding: 0 !important; cursor: pointer; font-weight: bold; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
}
.zevs-html .btn-del:hover { background: #3a1a1a; }
.zevs-html .btn-del:disabled { opacity: 0.3; cursor: not-allowed; }

.zevs-html .range-box { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.zevs-html .range-box input { flex-grow: 1; height: 4px; cursor: pointer; accent-color: #4488ff; }
.zevs-html .range-val { font-size: 14px; font-weight: bold; color: #6699ff; min-width: 24px; text-align: right; }

.zevs-html .btn-main { background: linear-gradient(135deg, #0033cc, #0044ff); color: white; border: none; font-weight: bold; cursor: pointer; padding: 10px !important; margin-top: 5px; }
.zevs-html .btn-main:hover { background: linear-gradient(135deg, #0044ff, #0055ff); box-shadow: 0 0 10px rgba(0,68,255,0.4); }
.zevs-html .btn-main:disabled { background: #333; }

.zevs-html .preview-area { display: flex; flex-direction: column; align-items: center; gap: 10px; justify-content: center; }
.zevs-html .canvas-container { width: 100%; max-width: 600px; aspect-ratio: 1; border: 1px solid #3333aa; border-radius: 8px; background: #0a0a1a; overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 15px rgba(0,0,100,0.2); }
.zevs-html canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.zevs-html .canvas-label { font-size: 15px; font-weight: bold; color: #ff4444; margin-bottom: 2px; text-align: center; text-shadow: 0 0 8px rgba(255,0,0,0.3); }
.zevs-html .stats { font-size: 12px; color: #6699ff; margin-top: 4px; text-align: center; }

.zevs-html .settings-group { background: #0a0a2a; padding: 8px; border-radius: 6px; border: 1px solid #3333aa; margin-bottom: 8px; }
.zevs-html .settings-title { font-size: 14px; font-weight: bold; color: #ff3333; margin-bottom: 6px; border-bottom: 1px solid #333; padding-bottom: 4px; text-shadow: 0 0 8px rgba(255,0,0,0.3); }

/* ZLADMIN LOGIN */
.zladmin-login-body {font-family:'Segoe UI',Arial,sans-serif;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);display:flex;justify-content:center;align-items:center;height:95vh;margin:0}
.zladmin-login-form {background:#fff;padding:40px;border-radius:16px;box-shadow:0 20px 60px rgba(0,0,0,0.3);width:340px}
.zladmin-login-form h2 {margin:0 0 20px;color:#333;font-weight:600;text-align:center}
.zladmin-login-form input {padding:12px 16px;margin:8px 0;width:90%;border:1px solid #ddd;border-radius:8px;font-size:15px;transition:border 0.2s}
.zladmin-login-form input:focus {border-color:#667eea;outline:none}
.zladmin-login-btn {padding:12px;width:100%;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:8px;font-size:16px;cursor:pointer;font-weight:600;transition:transform 0.1s}
.zladmin-login-btn:hover {transform:scale(1.02)}
.zladmin-error {color:#e74c3c;margin-bottom:10px;text-align:center;font-weight:500}

/* ZLADMIN ADMIN PANEL */
.zladmin *{margin:0;padding:0;box-sizing:border-box}
.zladmin body{font-family:'Segoe UI',Arial,sans-serif;background:#f0f2f5;min-height:95vh}
.zladmin .container{max-width:1600px;margin:20px auto;background:#fff;border-radius:20px;box-shadow:0 10px 40px rgba(0,0,0,0.08);overflow:hidden}
.zladmin .header{background:linear-gradient(135deg,#1a1a2e,#16213e,#0f3460);color:#fff;padding:10px 24px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px}
.zladmin .header h2{font-weight:600;font-size:18px}
.zladmin .header .tabs{display:flex;gap:8px}
.zladmin .header .tabs a{text-decoration:none;color:#e0e0e0;background:rgba(255,255,255,0.1);padding:6px 16px;border-radius:30px;font-size:13px;font-weight:500;transition:0.2s}
.zladmin .header .tabs a.active,.zladmin .header .tabs a:hover{background:rgba(255,255,255,0.22);color:#fff}
.zladmin .header a.logout{color:#e0e0e0;text-decoration:none;background:rgba(255,255,255,0.12);padding:5px 14px;border-radius:30px;font-size:13px;font-weight:500;transition:0.2s}
.zladmin .header a.logout:hover{background:rgba(255,255,255,0.22);color:#fff}
.zladmin .content{padding:18px 24px}
.zladmin .editor-layout{display:flex;gap:20px}
.zladmin .sidebar{width:280px;min-width:200px;background:#f7f8fc;border-radius:12px;padding:12px;display:flex;flex-direction:column;max-height:600px}
.zladmin .sidebar-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ddd;padding-bottom:6px;margin-bottom:8px}
.zladmin .sidebar-header h3{font-size:14px;font-weight:600;color:#333;margin:0}
.zladmin .create-folder-btn{font-size:11px;background:#0f3460;color:#fff;border:none;border-radius:12px;padding:3px 10px;cursor:pointer;text-decoration:none;white-space:nowrap}
.zladmin .create-folder-btn:hover{background:#1a4a7a}
.zladmin .sidebar-tree-wrapper{flex:1 1 auto;overflow-y:auto;margin-bottom:4px}
.zladmin .sidebar-back-link{font-size:12px;margin-bottom:4px;flex-shrink:0}
.zladmin .sidebar-back-link a{color:#0f3460;text-decoration:none}
.zladmin .sidebar-tree{list-style:none;padding:0;margin:0}
.zladmin .sidebar-tree li{margin:1px 0;padding:2px 4px;border-radius:6px;background:transparent;transition:0.1s;font-size:12px;display:flex;align-items:center;justify-content:space-between}
.zladmin .sidebar-tree li:hover{background:#e8ecf4}
.zladmin .sidebar-tree .item-left{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.zladmin .sidebar-tree .item-left a{text-decoration:none;color:#2c3e50;font-size:12px}
.zladmin .sidebar-tree .item-left a.active-file{background:#0f3460;color:#fff;padding:1px 6px;border-radius:12px}
.zladmin .sidebar-tree .item-actions{display:flex;gap:4px;flex-shrink:0;margin-left:3px}
.zladmin .sidebar-tree .del-link,.zladmin .sidebar-tree .edit-link{opacity:0.5;font-size:11px;cursor:pointer;text-decoration:none}
.zladmin .sidebar-tree .del-link:hover,.zladmin .sidebar-tree .edit-link:hover{opacity:1}
.zladmin .upload-area{flex-shrink:0;margin-top:10px;padding-top:10px;border-top:1px solid #ccc;text-align:center}
.zladmin .upload-area p{font-size:12px;color:#888;margin-bottom:6px}
.zladmin .upload-area input[type=file]{font-size:12px}
.zladmin .editor-area{flex:1}
.zladmin .editor-area .file-name{font-weight:600;color:#1a1a2e;margin-bottom:8px;font-size:15px}
.zladmin .success{background:#d4edda;color:#155724;padding:10px 18px;border-radius:10px;margin-bottom:12px;font-weight:500;font-size:14px}
.zladmin .error{background:#f8d7da;color:#721c24;padding:10px 18px;border-radius:10px;margin-bottom:12px;font-weight:500;font-size:14px}

.zladmin .line-numbered-wrapper {
    display: flex;
    border: 1px solid #d0d0d0;
    border-radius: 12px;
    overflow: hidden;
    background: #fafbfc;
    height: 500px;
}
.zladmin .line-numbered-wrapper:focus-within {
    border-color: #0f3460;
    box-shadow: 0 0 0 3px rgba(15,52,96,0.1);
}
.zladmin .line-numbers {
    background: #f0f0f0;
    color: #888;
    font-family: monospace;
    font-size: 13px;
    line-height: 18px;
    padding: 10px 0;
    overflow: hidden;
    user-select: none;
    min-width: 45px;
    border-right: 1px solid #ddd;
    flex-shrink: 0;
    height: 100%;
}
.zladmin .line-numbers .line-num {
    display: block;
    height: 18px;
    line-height: 18px;
    text-align: right;
    padding-right: 8px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
}
.zladmin .line-numbers .line-num.empty {
    color: transparent;
}

.zladmin .line-numbered-wrapper textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    padding: 10px;
    font-family: monospace;
    font-size: 13px;
    line-height: 18px;
    background: transparent;
    height: 100%;
    overflow-y: scroll;
}
.zladmin .line-numbered-wrapper textarea:disabled {
    background: #f5f5f5;
    color: #666;
}

.zladmin .summary-main .line-numbered-wrapper { height: 410px; }

.zladmin .editor-save-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #0f3460, #1a4a7a);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s;
}
.zladmin .editor-save-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(15,52,96,0.3);
}

.zladmin .generate-summary-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #0f3460, #1a4a7a);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s;
    width: 100%;
}
.zladmin .generate-summary-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(15,52,96,0.3);
}

.zladmin .apply-summary-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #0f3460, #1a4a7a);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s;
}
.zladmin .apply-summary-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(15,52,96,0.3);
}

.zladmin .backup-create-btn {
    padding: 100px 24px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #000000, #688eb5);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s;
}
.zladmin .backup-create-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(15,52,96,0.3);
}

.zladmin .backup-view-btn,
.zladmin .backup-restore-btn,
.zladmin .backup-save-btn {
    padding: 25px 25px;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #000000, #688eb5);
    color: #fff;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}
.zladmin .backup-view-btn:disabled,
.zladmin .backup-restore-btn:disabled,
.zladmin .backup-save-btn:disabled,
.zladmin .backup-view-btn.disabled,
.zladmin .backup-restore-btn.disabled,
.zladmin .backup-save-btn.disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    pointer-events: none;
}

.zladmin .search-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 30px;
    background: #0f3460;
    color: #fff;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
}
.zladmin .search-prev-btn,
.zladmin .search-next-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 30px;
    background: #e0e0e0;
    color: #333;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
}

.zladmin .select-all-btn,
.zladmin .deselect-all-btn {
    background: #0f3460;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
}

.zladmin .modal-save-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    background: #0f3460;
    color: #fff;
}
.zladmin .modal-cancel-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    background: #ccc;
    color: #333;
}

.zladmin .save-row{display:flex;align-items:center;gap:15px;margin-top:10px}
.zladmin .save-success-inline{color:#155724;font-weight:600;font-size:14px;background:#d4edda;padding:6px 12px;border-radius:8px}
.zladmin .image-preview-box{max-width:100%;max-height:500px;display:flex;align-items:center;justify-content:center;background:#eee;border-radius:12px;overflow:hidden;margin-bottom:12px}
.zladmin .image-preview-box img{max-width:100%;max-height:500px;object-fit:contain}
.zladmin .image-details{background:#f7f8fc;padding:12px 16px;border-radius:8px;font-size:13px;color:#333;margin-bottom:12px}
.zladmin .image-details div{margin-bottom:4px}

.zladmin .modal-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.5);z-index:1000;justify-content:center;align-items:center}
.zladmin .modal-overlay.active{display:flex}
.zladmin .modal-box{background:#fff;border-radius:14px;padding:20px 24px;width:360px;box-shadow:0 20px 50px rgba(0,0,0,0.3)}
.zladmin .modal-box h3{font-size:16px;margin-bottom:14px;color:#333}
.zladmin .modal-box label{font-size:12px;font-weight:600;display:block;margin-bottom:4px;color:#555}
.zladmin .modal-box input[type=text]{padding:8px 12px;width:100%;border:1px solid #ccc;border-radius:8px;font-size:13px;margin-bottom:12px}
.zladmin .perm-group{margin-bottom:10px}
.zladmin .perm-group span{font-size:12px;font-weight:600;display:inline-block;width:70px}
.zladmin .perm-group label{font-weight:400;margin-right:8px;font-size:12px;display:inline}
.zladmin .modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:14px}
.zladmin .modal-perms-display{margin-bottom:10px}
.zladmin .modal-perms-display input{width:80px;padding:6px 8px;border:1px solid #ccc;border-radius:6px;font-size:13px;text-align:center}

.zladmin .summary-layout{display:flex;gap:20px}
.zladmin .summary-sidebar{width:280px;background:#f7f8fc;border-radius:12px;padding:12px;display:flex;flex-direction:column}
.zladmin .summary-sidebar h3{font-size:14px;font-weight:600;margin-bottom:8px;color:#333}
.zladmin .select-buttons{margin-bottom:8px;display:flex;gap:6px}
.zladmin .file-list{max-height:400px;overflow-y:auto;border:1px solid #ddd;border-radius:8px;padding:6px;background:#fff}
.zladmin .file-list label{display:flex;align-items:center;gap:4px;font-size:12px;padding:3px 2px;border-radius:4px;cursor:pointer; color: #2c3e50;}
.zladmin .file-list label:hover{background:#e8ecf4}
.zladmin .summary-main{flex:1;display:flex;flex-direction:column}
.zladmin .summary-actions{margin-top:10px;display:flex;gap:10px;align-items:center}

.zladmin .backup-section {
    margin-top: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: center;
}
.zladmin .backup-files-panel {
    background: #f7f8fc;
    border-radius: 12px;
    padding: 12px;
    min-width: 300px;
    max-width: 400px;
    flex-shrink: 0;
    max-height: 200px;
    overflow-y: auto;
}
.zladmin .backup-files-panel h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}
.zladmin .backup-file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.zladmin .backup-file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 2px;
    transition: background 0.1s;
}
.zladmin .backup-file-list li:hover { background: #e8ecf4; }
.zladmin .backup-file-list li.active-backup { background: #0f3460; }
.zladmin .backup-file-list li.active-backup a { color: #fff; }
.zladmin .backup-file-list .item-left { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zladmin .backup-file-list .item-left a { text-decoration: none; color: #2c3e50; font-size: 12px; }
.zladmin .backup-file-list .item-actions { display: flex; gap: 4px; margin-left: 6px; }
.zladmin .backup-file-list .del-link, .zladmin .backup-file-list .edit-link { opacity: 0.5; font-size: 11px; cursor: pointer; text-decoration: none; }
.zladmin .backup-file-list .del-link:hover, .zladmin .backup-file-list .edit-link:hover { opacity: 1; }
.zladmin .backup-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-self: flex-start;
}
.zladmin .backup-actions a.backup-view-btn,
.zladmin .backup-actions a.backup-restore-btn,
.zladmin .backup-actions button.backup-save-btn,
.zladmin .backup-view-btn.disabled,
.zladmin .backup-restore-btn.disabled,
.zladmin .backup-save-btn.disabled {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    text-align: center;
}

.zladmin .backup-actions form {
    margin: 0;
}

@media(max-width:768px){
.zladmin .header{flex-direction:column;padding:10px 16px}
.zladmin .header h2{font-size:16px}
.zladmin .content{padding:12px 16px}
.zladmin .editor-layout,.zladmin .summary-layout{flex-direction:column}
.zladmin .sidebar,.zladmin .summary-sidebar{width:100%;max-height:300px}
.zladmin .line-numbered-wrapper{height:300px}
.zladmin .summary-main .line-numbered-wrapper{height:250px}
.zladmin .backup-section { flex-direction: column; }
}

/* КОНТАКТЫ */
.email-link { font-size: 24px; color: #ff4444; }

/* ZEVS GENERATOR во весь экран*/
.zevs-fullscreen-link { text-align: center; display: block; color: #4488ff; }