* {
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f5f7fa;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    background-color: #f5f7fa;
}

.nav-link {
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: #0d6efd !important;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon .material-icons {
    font-size: 28px;
}

/* Scene Flow */
.scene-node {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    margin: 0.5rem;
    min-width: 200px;
    max-width: 280px;
    position: relative;
    transition: all 0.2s ease;
}

.scene-node:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

.scene-node.has-choices {
    border-left: 4px solid #f59e0b;
}

.scene-node.is-ending {
    border-left: 4px solid #10b981;
}

.scene-node.is-start {
    border-left: 4px solid #0d6efd;
}

.scene-connector {
    stroke: #94a3b8;
    stroke-width: 2;
    fill: none;
}

/* File Upload */
.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
    background: #f8fafc;
    transition: all 0.2s ease;
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #0d6efd;
    background: #eff6ff;
}

.upload-zone .material-icons {
    font-size: 48px;
    color: #94a3b8;
}

/* Character Card */
.character-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.character-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.character-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Table Styles */
.table-modern {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.table-modern thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    color: #475569;
    padding: 1rem;
}

.table-modern tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table-modern tbody tr:hover {
    background: #f8fafc;
}

/* Buttons */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.btn-icon .material-icons {
    font-size: 18px;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 1rem;
}

.modal-header {
    border-bottom: 1px solid #e5e7eb;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
}

/* Dialog Editor */
.dialogue-item {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid #0d6efd;
}

.dialogue-item:hover {
    background: #eff6ff;
}

/* Choice Items */
.choice-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.choice-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Flow View */
.flow-container {
    background: #f0f4f8;
    border-radius: 1rem;
    padding: 2rem;
    min-height: 600px;
    overflow: auto;
    position: relative;
}

.flow-level {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed #cbd5e1;
}

.flow-level:last-child {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

/* Badge Colors */
.badge-good { background-color: #10b981 !important; }
.badge-neutral { background-color: #f59e0b !important; }
.badge-bad { background-color: #ef4444 !important; }
.bg-purple { background-color: #8b5cf6 !important; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state .material-icons {
    font-size: 64px;
    color: #cbd5e1;
}

/* JSON Preview */
.json-preview {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    max-height: 400px;
    overflow: auto;
}

.json-key { color: #93c5fd; }
.json-string { color: #86efac; }
.json-number { color: #fbbf24; }
.json-boolean { color: #f472b6; }
