/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid #34495e;
}

.sidebar-menu {
    list-style: none;
    margin-top: 20px;
}

.sidebar-menu li {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
}

.sidebar-menu li i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-menu li:hover {
    background-color: #34495e;
}

.sidebar-menu li.active {
    background-color: #3498db;
    font-weight: bold;
}

/* Content Styles */
.content {
    flex: 1;
    padding: 20px;
    position: relative;
}

.module-container {
    display: none;
    animation: fadeIn 0.3s;
}

.module-container.active {
    display: block;
}

/* Styles chung cho các module */
.module-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.controls {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button.danger {
    background-color: #e74c3c;
}

button.danger:hover {
    background-color: #c0392b;
}

button.success {
    background-color: #2ecc71;
}

button.success:hover {
    background-color: #27ae60;
}

input, select, textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.result-container {
    margin-top: 20px;
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.history-container {
    margin-top: 20px;
}
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 0;
    }

    .sidebar-header {
        display: none;
    }

    .sidebar-menu {
        display: flex;
        flex-direction: row;
        width: 100%;
    }

    .sidebar-menu li {
        flex: 1;
        justify-content: center;
        text-align: center;
        padding: 10px;
        font-size: 0.85em;
    }

    .content {
        padding: 15px;
    }

    .controls {
        flex-direction: column;
        gap: 8px;
    }

    input, textarea, select, button {
        font-size: 1em;
    }

    .result-container, .history-container, .code-box {
        font-size: 1em;
        padding: 10px;
    }

    .module-header h2 {
        font-size: 1.2em;
    }
}

/* Hiệu ứng */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}