* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e0e0e0;
    min-height: 100vh;
    /* Фоновая картинка + затемнение для читаемости текста */
    background: 
        radial-gradient(ellipse at center, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.75) 100%),
        url('../assets/background.jpg') center/cover no-repeat fixed;
    position: relative;
    overflow-x: hidden;
}

/* ===== ХЕДЕР ===== */
header {
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, rgba(10,10,20,0.95) 0%, rgba(10,10,20,0.7) 100%);
    border-bottom: 3px solid #d4af37;
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 40px;
    filter: drop-shadow(0 0 10px rgba(212,175,55,0.6));
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(45deg, #d4af37, #f4e5a1, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-sub {
    font-size: 12px;
    color: #aaa;
    letter-spacing: 2px;
    text-transform: uppercase;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    color: #d4af37;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    position: relative;
    padding: 5px 0;
}

nav a:hover {
    color: #f4e5a1;
    text-shadow: 0 0 10px rgba(212,175,55,0.6);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #d4af37;
    transition: 0.3s;
}

nav a:hover::after { width: 100%; }

/* ===== HERO ===== */
.hero {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 60px 20px 40px;
    background: radial-gradient(ellipse at center, rgba(212,175,55,0.1) 0%, transparent 70%);
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #d4af37, #f4e5a1, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(0,0,0,0.8);
}

.hero p {
    font-size: 18px;
    color: #ddd;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}

.hero-divider {
    width: 200px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    margin: 20px auto;
}

/* ===== КОНТЕНТ ===== */
.container {
    position: relative;
    z-index: 5;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.editor-wrapper {
    background: rgba(20, 20, 35, 0.88);
    border: 2px solid #d4af37;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 
        0 0 30px rgba(212,175,55,0.2),
        inset 0 0 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.editor-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(212,175,55,0.3);
}

.editor-header h2 {
    color: #d4af37;
    font-size: 28px;
    margin-bottom: 5px;
}

.editor-header p {
    color: #aaa;
    font-size: 14px;
}

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }

.panel { 
    background: rgba(30,30,50,0.92); 
    padding: 18px; 
    border-radius: 12px; 
    border: 1px solid #444;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    margin-bottom: 20px;
}
.panel h2 { color: #d4af37; margin-bottom: 12px; font-size: 16px; border-bottom: 1px solid #333; padding-bottom: 6px; }

label { display: block; margin-top: 10px; color: #aaa; font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; }
input, select { 
    width: 100%; padding: 7px 10px; margin-top: 3px; 
    background: #1a1a2e; border: 1px solid #444; 
    color: #fff; border-radius: 5px; font-size: 13px;
}
input:focus { outline: none; border-color: #d4af37; box-shadow: 0 0 8px rgba(212,175,55,0.3); }

.color-row { display: flex; gap: 8px; align-items: center; margin-top: 3px; }
.color-row input[type="color"] { width: 45px; height: 32px; padding: 2px; cursor: pointer; }
.color-row input[type="text"] { flex: 1; }
.color-row input[type="number"] { width: 60px; }

.name-part { 
    display: grid; 
    grid-template-columns: 1fr 45px 60px 28px; 
    gap: 5px; 
    margin-bottom: 5px; 
    align-items: center;
    background: rgba(0,0,0,0.3);
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #333;
}
.name-part input { margin-top: 0; padding: 6px 8px; font-size: 13px; }
.name-part input[type="color"] { width: 45px; height: 30px; }

.role-row { 
    display: grid; 
    grid-template-columns: 35px 1fr 1fr 28px; 
    gap: 5px; 
    margin-bottom: 5px; 
    align-items: center;
    background: rgba(0,0,0,0.3);
    padding: 5px;
    border-radius: 6px;
    border: 1px solid #333;
}
.role-row input { margin-top: 0; padding: 6px 8px; font-size: 12px; }

.btn { 
    background: linear-gradient(45deg, #d4af37, #aa8c2c); 
    color: #000; border: none; padding: 9px 14px; 
    cursor: pointer; font-weight: bold; border-radius: 5px; 
    font-size: 13px; transition: 0.3s; margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn:hover { 
    background: linear-gradient(45deg, #f4e5a1, #d4af37); 
    transform: translateY(-2px); 
    box-shadow: 0 4px 15px rgba(212,175,55,0.5);
}
.btn-add { background: linear-gradient(45deg, #2d5016, #1a3009); color: #d4af37; }
.btn-add:hover { background: linear-gradient(45deg, #3d6b1e, #2d5016); }
.btn-remove { 
    background: #8b0000; color: #fff; border: none; 
    border-radius: 50%; width: 26px; height: 26px; 
    cursor: pointer; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
}
.btn-remove:hover { background: #cc0000; }
.btn-copy { 
    background: linear-gradient(45deg, #d4af37, #aa8c2c); 
    width: 100%; padding: 12px; font-size: 15px; 
}

.symbol-panel { 
    background: rgba(10,10,20,0.95);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
}
.symbol-panel::-webkit-scrollbar { width: 8px; }
.symbol-panel::-webkit-scrollbar-track { background: #1a1a2e; }
.symbol-panel::-webkit-scrollbar-thumb { background: #d4af37; border-radius: 4px; }

.symbol-category { 
    color: #d4af37; 
    font-size: 11px; 
    margin: 8px 0 4px 0; 
    text-transform: uppercase;
    border-bottom: 1px solid #333;
    padding-bottom: 3px;
    font-weight: bold;
}
.symbol-category:first-child { margin-top: 0; }
.symbol-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)); 
    gap: 3px; 
}
.symbol-btn { 
    background: #2a2a4a; 
    border: 1px solid #444; 
    color: #fff; 
    padding: 4px; 
    cursor: pointer; 
    border-radius: 4px; 
    font-size: 16px;
    transition: 0.2s;
    text-align: center;
}
.symbol-btn:hover { 
    background: #d4af37; 
    border-color: #d4af37;
    color: #000;
    transform: scale(1.15);
}

#preview { 
    background: #0a2a4a; 
    padding: 15px; 
    border-radius: 8px; 
    min-height: 200px;
    border: 2px solid #1a4a7a;
    font-family: Arial, sans-serif;
    overflow-y: auto;
    max-height: 350px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}
#code-output { 
    background: #0a0a0a; 
    padding: 10px; 
    border-radius: 6px; 
    font-family: 'Courier New', monospace; 
    font-size: 11px; 
    color: #00ff00;
    white-space: pre-wrap;
    word-break: break-all;
    margin-top: 8px;
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #333;
}
.success-msg { color: #00ff00; text-align: center; margin-top: 8px; font-weight: bold; display: none; }

.hint { color: #888; font-size: 11px; margin-top: 4px; font-style: italic; }

/* ===== ФУТЕР ===== */
footer {
    position: relative;
    z-index: 5;
    background: linear-gradient(180deg, rgba(10,10,20,0.7) 0%, rgba(10,10,20,0.95) 100%);
    border-top: 3px solid #d4af37;
    padding: 30px 20px;
    margin-top: 50px;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #d4af37;
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #f4e5a1;
    text-shadow: 0 0 10px rgba(212,175,55,0.6);
}

.footer-copy {
    color: #666;
    font-size: 13px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 15px; }
    .logo-text { font-size: 18px; }
    nav ul { gap: 15px; font-size: 13px; }
    .name-part { grid-template-columns: 1fr 40px 50px 25px; }
}