/* Main CSS for ProfessorPhD2025v1 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #1e3a8a;
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.logo h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.version {
    font-size: 12px;
    opacity: 0.7;
}

.nav-menu {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
}

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

.nav-item .icon {
    margin-right: 10px;
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.logout-btn .icon {
    margin-right: 8px;
}

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

.main-header {
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-header h1 {
    font-size: 24px;
    color: #1e3a8a;
}

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

/* Sections */
.section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    height: 100%;
}

.section.hidden {
    display: none;
}

/* Login Section */
.login-container {
    max-width: 400px;
    margin: 40px auto;
    text-align: center;
}

.login-container h2 {
    font-size: 28px;
    color: #1e3a8a;
    margin-bottom: 10px;
}

.login-container h3 {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.login-form {
    text-align: left;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: #1e3a8a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.login-btn:hover {
    background-color: #15296b;
}

.login-info {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

/* Chat Section */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.system {
    align-items: flex-start;
}

.message-content {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 18px;
    font-size: 16px;
    line-height: 1.4;
}

.message.user .message-content {
    background-color: #1e3a8a;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message.system .message-content {
    background-color: #e9ecef;
    color: #333;
    border-bottom-left-radius: 4px;
}

.chat-input-container {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 5px;
}

#chat-input {
    flex: 1;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    outline: none;
    background: transparent;
}

#send-btn {
    background-color: #1e3a8a;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 5px;
}

#send-btn:hover {
    background-color: #15296b;
}

/* Upload Section */
.upload-container {
    max-width: 800px;
    margin: 0 auto;
}

.upload-container h2 {
    margin-bottom: 10px;
    color: #1e3a8a;
}

.upload-container p {
    margin-bottom: 20px;
    color: #666;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.upload-area:hover {
    border-color: #1e3a8a;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-area p {
    margin-bottom: 0;
}

#file-input {
    display: none;
}

.uploaded-files {
    margin-top: 30px;
}

.uploaded-files h3 {
    margin-bottom: 15px;
    color: #1e3a8a;
}

.file-list {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.file-item:last-child {
    border-bottom: none;
}

.file-name {
    display: flex;
    align-items: center;
}

.file-icon {
    margin-right: 10px;
    font-size: 20px;
}

.file-actions button {
    background-color: transparent;
    border: none;
    color: #1e3a8a;
    cursor: pointer;
    margin-left: 10px;
}

.file-actions button:hover {
    text-decoration: underline;
}

/* Vector Store Section */
.vector-store-container {
    max-width: 800px;
    margin: 0 auto;
}

.vector-store-container h2 {
    margin-bottom: 10px;
    color: #1e3a8a;
}

.vector-store-container p {
    margin-bottom: 20px;
    color: #666;
}

.vector-stores-list {
    margin-bottom: 30px;
}

.vector-store-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.vector-store-info h3 {
    margin-bottom: 5px;
    color: #1e3a8a;
}

.vector-store-info p {
    margin-bottom: 0;
    font-size: 14px;
    color: #666;
}

.vector-store-actions button {
    padding: 8px 12px;
    margin-left: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-view {
    background-color: #e9ecef;
    color: #333;
}

.btn-update {
    background-color: #1e3a8a;
    color: #fff;
}

.btn-delete {
    background-color: #dc3545;
    color: #fff;
}

.btn-create-store {
    padding: 10px 15px;
    background-color: #1e3a8a;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-create-store:hover {
    background-color: #15296b;
}

/* Visualization Section */
.visualization-container {
    max-width: 800px;
    margin: 0 auto;
}

.visualization-container h2 {
    margin-bottom: 10px;
    color: #1e3a8a;
}

.visualization-container p {
    margin-bottom: 20px;
    color: #666;
}

.visualization-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.visualization-option {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.visualization-option h3 {
    margin-bottom: 10px;
    color: #1e3a8a;
}

.visualization-option p {
    margin-bottom: 15px;
    font-size: 14px;
}

.btn-generate {
    padding: 8px 12px;
    background-color: #1e3a8a;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.visualization-preview {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.visualization-preview h3 {
    margin-bottom: 15px;
    color: #1e3a8a;
}

.preview-area {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ddd;
    border-radius: 4px;
}

/* Settings Section */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
}

.settings-container h2 {
    margin-bottom: 20px;
    color: #1e3a8a;
}

.settings-group {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.settings-group h3 {
    margin-bottom: 15px;
    color: #1e3a8a;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.setting-item input[type="text"],
.setting-item input[type="number"],
.setting-item select,
.setting-item textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.setting-item input[type="range"] {
    width: calc(100% - 50px);
    vertical-align: middle;
}

.setting-item span {
    display: inline-block;
    width: 40px;
    text-align: right;
}

.btn-save-settings {
    padding: 10px 15px;
    background-color: #1e3a8a;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.btn-save-settings:hover {
    background-color: #15296b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 10px 0;
    }
    
    .nav-item {
        padding: 10px 15px;
    }
    
    .main-header {
        padding: 15px;
    }
    
    .content-area {
        padding: 15px;
    }
    
    .chat-container {
        height: calc(100vh - 200px);
    }
    
    .visualization-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .message-content {
        max-width: 90%;
    }
    
    .vector-store-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .vector-store-actions {
        margin-top: 10px;
    }
    
    .setting-item input[type="range"] {
        width: calc(100% - 40px);
    }
}
