* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
    direction: rtl;
    background: #0f172a;
    color: #e5e7eb;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1100px, 94%);
    margin: auto;
}

.navbar {
    background: #020617;
    border-bottom: 1px solid #1e293b;
    padding: 14px 0;
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo {
    font-weight: bold;
    color: #38bdf8;
}

.card {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 18px;
    padding: 22px;
    margin-top: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.input {
    width: 100%;
    background: #020617;
    color: #e5e7eb;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 13px;
    margin: 8px 0 14px;
    outline: none;
}

.input:focus {
    border-color: #38bdf8;
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    background: #2563eb;
    color: white;
    font-weight: bold;
}

.btn:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #334155;
}

.btn-danger {
    background: #dc2626;
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin: 12px 0;
}

.alert-error {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid #dc2626;
}

.alert-success {
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid #16a34a;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.project-card {
    background: #020617;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 16px;
}

.muted {
    color: #94a3b8;
    font-size: 14px;
}

@media (max-width: 800px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .navbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn {
        width: 100%;
        text-align: center;
        margin-top: 6px;
    }
}
.editor-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 10px 12px;
    overflow-wrap: anywhere;
}

.small-btn {
    display: inline-block;
    background: #2563eb;
    color: white;
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 13px;
    white-space: nowrap;
}

.small-btn:hover {
    background: #1d4ed8;
}

.code-editor {
    width: 100%;
    min-height: 520px;
    background: #020617;
    color: #e5e7eb;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 14px;
    direction: ltr;
    text-align: left;
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}

.preview-box {
    background: #020617;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 18px;
    text-align: center;
}

.preview-image {
    max-width: 100%;
    height: auto;
    image-rendering: pixelated;
    border-radius: 10px;
    background: #111827;
}

.audio-player {
    width: 100%;
    margin-top: 15px;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
}

.path-badge {
    display: inline-block;
    direction: ltr;
    background: #020617;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 8px 10px;
    color: #cbd5e1;
    overflow-wrap: anywhere;
}

.toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}

@media (max-width: 800px) {
    .file-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .small-btn {
        width: 100%;
        text-align: center;
    }

    .code-editor {
        min-height: 420px;
        font-size: 13px;
    }
}
.unit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.unit-card {
    background: #020617;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 16px;
}

.unit-type {
    display: inline-block;
    background: #1e293b;
    color: #bae6fd;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    margin-bottom: 8px;
}

.unit-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.unit-info span {
    background: #111827;
    border: 1px solid 
    .faction-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.faction-card {
    background: #020617;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 16px;
}

.faction-key {
    display: inline-block;
    background: #111827;
    border: 1px solid #1f2937;
    color: #93c5fd;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    margin-bottom: 8px;
}

@media (max-width: 800px) {
    .faction-grid {
        grid-template-columns: 1fr;
    }
}
.rules-list {
    display: grid;
    gap: 14px;
}

.rule-card {
    background: #020617;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 16px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}
.weapon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.weapon-card {
    background: #020617;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 16px;
}

.weapon-card h3 {
    margin-top: 0;
    color: #93c5fd;
    direction: ltr;
    text-align: left;
}

.weapon-card label {
    margin-top: 10px;
}
