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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    min-height: 100vh;
    color: #e2e8f0;
}

/* Header */
.header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.brand { display: flex; align-items: center; gap: 15px; }
.brand-icon {
    width: 45px; height: 45px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.brand-icon svg { width: 28px; height: 28px; fill: white; }
.brand-text h1 { font-size: 1.5rem; color: #e2e8f0; margin-bottom: 3px; }
.brand-text p { font-size: 0.85rem; color: #94a3b8; }

.nav-menu { display: flex; gap: 10px; align-items: center; }
.nav-btn {
    padding: 10px 20px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    color: #cbd5e1;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; font-size: 0.9rem;
}
.nav-btn:hover { background: rgba(99, 102, 241, 0.2); border-color: #6366f1; color: #e2e8f0; }
.nav-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: transparent; color: white;
}

/* Main */
.main-content { padding: 30px; max-width: 1600px; margin: 0 auto; }

.toolbar {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.9rem;
}
.breadcrumb-item { color: #94a3b8; }
.breadcrumb-item.active { color: #e2e8f0; }

.toolbar-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
    padding: 10px 18px; border: none; border-radius: 10px;
    font-weight: 600; cursor: pointer; transition: all 0.3s;
    display: flex; align-items: center; gap: 8px; font-size: 0.9rem;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); color: white; }
.btn-secondary { background: rgba(148, 163, 184, 0.1); border: 1px solid rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.btn-success { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); color: white; }
.btn-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: white; }

/* Startup Bar */
.startup-bar {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.startup-info { display: flex; align-items: center; gap: 10px; }
.startup-label { color: #fbbf24; font-weight: 600; }
.startup-value {
    font-family: 'JetBrains Mono', monospace;
    color: #fcd34d;
    background: rgba(0,0,0,0.3);
    padding: 5px 12px;
    border-radius: 8px;
}

/* File Grid */
.file-container {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 25px;
    min-height: 500px;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.file-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    position: relative;
}
.file-item:hover {
    border-color: #6366f1;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}
.file-item.startup-file {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}
.file-item.startup-file::before {
    content: ' STARTUP';
    position: absolute;
    top: -10px;
    right: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.file-icon {
    width: 60px; height: 60px; margin: 0 auto 15px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
}
.file-name {
    font-size: 0.9rem; font-weight: 600; text-align: center;
    word-break: break-word; margin-bottom: 5px;
    color: #e2e8f0;
}
.file-size { font-size: 0.75rem; color: #64748b; text-align: center; margin-bottom: 15px; }

.file-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}
.file-action-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.file-action-btn:hover { transform: scale(1.05); }
.file-action-btn.edit { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.file-action-btn.rename { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.file-action-btn.delete { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.file-action-btn.startup { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.empty-state {
    text-align: center; padding: 80px 20px; color: #64748b;
}
.empty-icon { font-size: 4rem; margin-bottom: 20px; opacity: 0.5; }

/* Modals */
.modal {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center; justify-content: center; padding: 20px;
}
.modal.active { display: flex; }

.modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    width: 100%; max-width: 800px; max-height: 90vh; overflow: hidden;
    animation: modalIn 0.3s ease-out;
}
.modal-content.small { max-width: 500px; }

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-title { font-size: 1.2rem; font-weight: 700; color: #e2e8f0; }
.btn-close {
    background: rgba(148, 163, 184, 0.1);
    border: none;
    color: #cbd5e1;
    width: 32px; height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}
.btn-close:hover { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.modal-body { padding: 25px; overflow-y: auto; max-height: calc(90vh - 140px); }
.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    display: flex; justify-content: flex-end; gap: 12px;
}
.modal-desc { color: #94a3b8; margin-bottom: 15px; font-size: 0.9rem; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #cbd5e1; font-size: 0.9rem; }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px; color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace; font-size: 0.9rem;
    transition: all 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.form-group textarea { min-height: 400px; resize: vertical; }

.upload-area {
    border: 2px dashed rgba(148, 163, 184, 0.3);
    border-radius: 12px; padding: 40px; text-align: center; cursor: pointer;
    transition: all 0.3s;
}
.upload-area:hover { border-color: #6366f1; background: rgba(99, 102, 241, 0.05); }
.upload-icon { font-size: 3rem; margin-bottom: 10px; }
.upload-text { font-size: 1rem; font-weight: 600; margin-bottom: 5px; }
.upload-hint { color: #64748b; font-size: 0.85rem; }

/* Startup File List */
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-list-item {
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}
.file-list-item:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}
.file-list-item.current {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

/* Notification */
.notification {
    position: fixed; top: 20px; right: 20px;
    padding: 16px 24px; border-radius: 12px;
    color: white; font-weight: 600; z-index: 2000;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 768px) {
    .header { flex-direction: column; }
    .nav-menu { width: 100%; justify-content: center; }
    .file-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .startup-bar { flex-direction: column; align-items: stretch; }
}
