/* Game Editor Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
}

.editor-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.editor-header {
    background: #0f3460;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.editor-header h1 {
    font-size: 1.5rem;
    color: #4a9d4a;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #4a9d4a;
    color: white;
}

.btn-primary:hover {
    background: #3d8b3d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 157, 74, 0.3);
}

.btn-secondary {
    background: #16a085;
    color: white;
}

.btn-secondary:hover {
    background: #138871;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-small {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    background: #34495e;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background: #2c3e50;
}

/* Content Area */
.editor-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.editor-sidebar {
    width: 200px;
    background: #0f3460;
    padding: 1rem;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
}

.editor-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-btn {
    padding: 0.8rem 1rem;
    background: transparent;
    color: #a0a0a0;
    border: none;
    border-left: 3px solid transparent;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: rgba(74, 157, 74, 0.1);
    color: #4a9d4a;
    border-left-color: #4a9d4a;
}

.nav-btn.active {
    background: rgba(74, 157, 74, 0.2);
    color: #4a9d4a;
    border-left-color: #4a9d4a;
    font-weight: 600;
}

/* Main Content */
.editor-main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: #1a1a2e;
}

.editor-main h2 {
    color: #4a9d4a;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.editor-main h3 {
    color: #16a085;
    margin: 1.5rem 0 1rem;
    font-size: 1.3rem;
}

/* Tabs */
.editor-tab {
    display: none;
}

.editor-tab.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Asset Grid */
.asset-section {
    margin-bottom: 2rem;
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.asset-card {
    background: #0f3460;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.asset-card:hover {
    border-color: #4a9d4a;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(74, 157, 74, 0.3);
}

.asset-card img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.asset-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.asset-info span {
    font-size: 0.9rem;
    color: #a0a0a0;
}

/* Upload Zone */
.upload-zone {
    border: 3px dashed #4a9d4a;
    border-radius: 10px;
    padding: 3rem;
    text-align: center;
    background: rgba(74, 157, 74, 0.05);
    cursor: pointer;
    transition: all 0.3s;
}

.upload-zone:hover {
    background: rgba(74, 157, 74, 0.1);
    border-color: #3d8b3d;
}

.upload-zone.drag-over {
    background: rgba(74, 157, 74, 0.2);
    border-color: #2ecc71;
}

.upload-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.upload-content p {
    font-size: 1.1rem;
    color: #4a9d4a;
    margin-bottom: 0.5rem;
}

.upload-content small {
    color: #7f8c8d;
}

/* Config Sections */
.config-section {
    background: #0f3460;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-item label {
    color: #a0a0a0;
    font-size: 0.9rem;
    font-weight: 600;
}

.config-item input {
    padding: 0.6rem;
    background: #1a1a2e;
    border: 2px solid #34495e;
    border-radius: 5px;
    color: #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s;
}

.config-item input:focus {
    outline: none;
    border-color: #4a9d4a;
    box-shadow: 0 0 0 3px rgba(74, 157, 74, 0.1);
}

/* Alien Type Cards */
.alien-type-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alien-type-card h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Sound List */
.sound-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.sound-item {
    background: #0f3460;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sound-name {
    flex: 1;
    font-size: 1rem;
}

.sound-item button {
    margin-left: 0.5rem;
}

/* Backup List */
.backup-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.backup-item {
    background: #0f3460;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.backup-info {
    flex: 1;
}

.backup-info strong {
    color: #4a9d4a;
    display: block;
    margin-bottom: 0.3rem;
}

.backup-info small {
    color: #7f8c8d;
}

.backup-actions {
    display: flex;
    gap: 0.5rem;
}

.info-text {
    color: #7f8c8d;
    text-align: center;
    padding: 2rem;
}

/* Footer */
.editor-footer {
    background: #0f3460;
    padding: 0.8rem 2rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.status-bar {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #a0a0a0;
}

#status-message {
    color: #4a9d4a;
}

/* Scrollbar */
.editor-main::-webkit-scrollbar {
    width: 10px;
}

.editor-main::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.editor-main::-webkit-scrollbar-thumb {
    background: #4a9d4a;
    border-radius: 5px;
}

.editor-main::-webkit-scrollbar-thumb:hover {
    background: #3d8b3d;
}

/* Responsive */
@media (max-width: 768px) {
    .editor-sidebar {
        width: 100%;
        padding: 0.5rem;
    }

    .editor-nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .nav-btn {
        white-space: nowrap;
    }

    .editor-content {
        flex-direction: column;
    }

    .config-grid {
        grid-template-columns: 1fr;
    }
}
