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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f0f2f5 0%, #e8ecef 100%);
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    margin: 0;
}

.mobile-container {
    width: 100%;
    max-width: 420px;
    height: 85vh;
    max-height: 800px;
    background: white;
    backdrop-filter: blur(20px);
    border-radius: 28px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.12), 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.app-header {
    background: white;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    color: #1a202c;
    padding: 25px 25px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
}

.header-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 15px;
}

.app-header h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 5px 0;
    letter-spacing: -0.5px;
    color: #1a202c;
}

.user-selection {
    margin-top: 5px;
}

.user-dropdown {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #1a202c;
    font-weight: 600;
    min-width: 160px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-dropdown:focus {
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.user-dropdown option {
    background: white;
    color: #1a202c;
    padding: 8px;
}

.settings-btn {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1a202c;
    font-size: 16px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) translateY(-1px);
}

/* Bottom Navigation */
.bottom-navigation {
    display: flex;
    background: white;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 15px 0 25px;
    position: relative;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.04);
}

.nav-btn {
    flex: 1;
    padding: 12px 10px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border-radius: 12px;
    margin: 0 8px;
}

.nav-icon {
    font-size: 20px;
    transition: all 0.2s ease;
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.nav-btn.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.nav-btn.active .nav-icon {
    transform: scale(1.05);
}

.nav-btn:hover:not(.active) {
    color: #667eea;
    background: rgba(102, 126, 234, 0.04);
}

.app-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #fafbfc;
}

.tab-content {
    display: none;
    height: 100%;
    padding: 25px;
    padding-bottom: 0;
    overflow-y: auto;
    background: transparent;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* TODO Tab Styles */
.todo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.todo-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.todo-header h2 {
    color: #1a202c;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.add-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: #667eea;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.add-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.export-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: #48bb78;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-btn:hover {
    background: #38a169;
    transform: scale(1.1);
}

.spark-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: #f56565;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spark-btn:hover {
    background: #e53e3e;
    transform: scale(1.1);
}

.person-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
}

.person-item {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.person-item:hover {
    background: #f7fafc;
    border-color: #667eea;
}

.person-item.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.person-name {
    font-weight: 600;
    font-size: 14px;
}

.person-id {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.person-item.selected .person-id {
    color: #e2e8f0;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.todo-input-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.todo-input-section input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 10px;
}

.input-actions {
    display: flex;
    gap: 10px;
}

.input-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#saveTodoBtn {
    background: #48bb78;
    color: white;
}

#cancelTodoBtn {
    background: #e2e8f0;
    color: #666;
}

.todo-list {
    list-style: none;
    flex: 1;
}

.todo-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.todo-item:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    border-color: rgba(102, 126, 234, 0.2);
}

.todo-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

.todo-text {
    flex: 1;
    font-size: 15px;
    color: #1a202c;
    font-weight: 500;
    line-height: 1.4;
}

.todo-actions {
    display: flex;
    gap: 10px;
}

.todo-actions button {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.complete-btn {
    background: #48bb78;
    color: white;
}

.delete-btn {
    background: #f56565;
    color: white;
}

/* Chat Tab Styles */
.chat-header {
    margin-bottom: 20px;
}

.chat-header h2 {
    color: #1a202c;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 10px 0;
}

.message {
    margin-bottom: 15px;
    max-width: 80%;
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    margin-left: auto;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.bot-message .message-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #1a202c;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
    text-align: right;
}

.bot-message .message-time {
    text-align: left;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.chat-input-container input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
}

#sendChatBtn {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

#sendChatBtn:hover {
    background: #5a67d8;
}

/* Upload Tab Styles */
.upload-header {
    margin-bottom: 20px;
}

.upload-header h2 {
    color: #333;
    font-size: 24px;
}

.upload-section {
    flex: 1;
}

.upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #ebf4ff;
}

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

.upload-area p {
    color: #666;
    font-size: 14px;
}

.json-preview {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.json-preview h3 {
    margin-bottom: 15px;
    color: #333;
}

.json-preview pre {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 15px;
    font-size: 12px;
    overflow-x: auto;
    max-height: 200px;
    margin-bottom: 15px;
}

#processJsonBtn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#processJsonBtn:hover {
    background: #5a67d8;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .mobile-container {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .app-header {
        padding: 30px 15px 15px;
    }
    
    .app-header h1 {
        font-size: 16px;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

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

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

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px 20px 10px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #333;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f0f0f0;
}

.modal-body {
    padding: 20px;
}

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

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

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


.setting-group textarea {
    height: 80px;
    resize: vertical;
}

.setting-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.modal-footer {
    padding: 15px 20px 20px;
    border-top: 1px solid #e0e0e0;
}

#saveSettingsBtn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#saveSettingsBtn:hover {
    background: #5a67d8;
}


.modal-body .upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    padding: 30px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.modal-body .upload-area:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.modal-body .upload-area.dragover {
    border-color: #667eea;
    background: #ebf4ff;
}

.modal-body .upload-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.modal-body .upload-area p {
    color: #666;
    font-size: 13px;
    margin: 0;
}

.modal-body .json-preview {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.modal-body .json-preview h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

.modal-body .json-preview pre {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    font-size: 11px;
    overflow-x: auto;
    max-height: 120px;
    margin-bottom: 10px;
}

.process-btn {
    width: 100%;
    padding: 10px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.process-btn:hover {
    background: #38a169;
}