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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.cms-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: 300px;
    background: #2c3e50;
    color: white;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar h2 {
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #3498db;
}

.btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Page List */
.page-list {
    list-style: none;
    margin-top: 10px;
}

.page-item {
    padding: 10px;
    margin-bottom: 5px;
    background: #34495e;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-item:hover {
    background: #3d566e;
}

.page-item.active {
    background: #3498db;
}

.page-item-actions {
    display: flex;
    gap: 5px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
}

/* Menu Builder */
.menu-tree {
    list-style: none;
    margin-top: 10px;
}

.menu-item {
    margin-bottom: 5px;
}

.menu-item-content {
    padding: 8px;
    background: #34495e;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.menu-item-content:hover {
    background: #3d566e;
}

.menu-item-children {
    margin-left: 20px;
    margin-top: 5px;
    padding-left: 10px;
    border-left: 2px solid #3498db;
}

.menu-item-actions {
    display: flex;
    gap: 5px;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h1 {
    font-size: 1.8em;
    color: #2c3e50;
}

.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Editor Area */
.editor-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
    background: #ecf0f1;
    border-radius: 5px;
    margin-bottom: 15px;
}

.editor-btn {
    padding: 8px 12px;
    border: none;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    border: 1px solid #bdc3c7;
}

.editor-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.editor-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

#contentEditor {
    min-height: 400px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    font-size: 16px;
    line-height: 1.6;
}

#contentEditor:focus {
    border-color: #3498db;
}

/* Style Customization Panel */
.style-panel {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.style-panel h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.style-control {
    margin-bottom: 20px;
}

.style-control label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.style-control input[type="color"],
.style-control input[type="number"],
.style-control input[type="range"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.style-control input[type="color"] {
    height: 50px;
    cursor: pointer;
}

.style-control input[type="range"] {
    padding: 0;
}

.range-value {
    display: inline-block;
    margin-left: 10px;
    font-weight: bold;
    color: #3498db;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Plugin System */
.plugin-list {
    list-style: none;
    margin-top: 15px;
}

.plugin-item {
    padding: 15px;
    background: #34495e;
    border-radius: 5px;
    margin-bottom: 10px;
}

.plugin-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.plugin-item-name {
    font-weight: bold;
    color: #3498db;
}

.plugin-item-status {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.plugin-item-status.active {
    background: #27ae60;
    color: white;
}

.plugin-item-status.inactive {
    background: #95a5a6;
    color: white;
}

.plugin-item-description {
    font-size: 13px;
    color: #bdc3c7;
    margin-bottom: 10px;
}

.plugin-item-actions {
    display: flex;
    gap: 5px;
}

/* Code Editor for Plugins */
.code-editor {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: #2c3e50;
    color: #ecf0f1;
    resize: vertical;
}

/* Welcome Screen */
.welcome-screen {
    text-align: center;
    padding: 50px;
}

.welcome-screen h2 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 20px;
}

.welcome-screen p {
    font-size: 1.2em;
    color: #7f8c8d;
    margin-bottom: 30px;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.feature-card h3 {
    color: #3498db;
    margin-bottom: 15px;
}

.feature-card p {
    color: #7f8c8d;
    font-size: 0.95em;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cms-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 300px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}