* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; padding: 20px; } .container { max-width: 900px; margin: 0 auto; background: white; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden; } header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; text-align: center; } header h1 { font-size: 2.5em; margin-bottom: 10px; } header p { font-size: 1.1em; opacity: 0.9; } .status-bar { background: #f7f9fc; padding: 15px 30px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e2e8f0; } .status-indicator { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 10px; } .status-indicator.ready { background: #48bb78; animation: pulse 2s infinite; } .status-indicator.not-ready { background: #f56565; } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(72, 187, 120, 0); } 100% { box-shadow: 0 0 0 0 rgba(72, 187, 120, 0); } } .stats-btn { background: #667eea; color: white; border: none; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 0.9em; transition: background 0.3s; } .stats-btn:hover { background: #5a67d8; } .init-section, .main-content { padding: 30px; } .init-section h3, .query-section h3, .results-section h3, .upload-section h3 { color: #2d3748; margin-bottom: 20px; font-size: 1.3em; } #apiKeyInput { width: 100%; padding: 12px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 1em; margin-bottom: 15px; } #initBtn, #submitBtn, #uploadBtn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 12px 30px; border-radius: 8px; font-size: 1em; cursor: pointer; transition: transform 0.3s, box-shadow 0.3s; } #initBtn:hover, #submitBtn:hover, #uploadBtn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4); } .input-group { margin-bottom: 20px; } #queryInput { width: 100%; padding: 15px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 1em; resize: vertical; margin-bottom: 15px; } #queryInput:focus { outline: none; border-color: #667eea; } .sample-queries { margin-top: 20px; } .sample-queries p { color: #718096; margin-bottom: 10px; } .sample-btn { background: #edf2f7; color: #4a5568; border: 1px solid #cbd5e0; padding: 8px 16px; border-radius: 6px; margin-right: 10px; margin-bottom: 10px; cursor: pointer; transition: all 0.3s; } .sample-btn:hover { background: #e2e8f0; border-color: #a0aec0; } .results-section { background: #f7fafc; padding: 25px; border-radius: 12px; margin-top: 25px; } .answer-content { background: white; padding: 20px; border-radius: 8px; line-height: 1.6; color: #2d3748; margin-bottom: 15px; } .metadata { display: flex; justify-content: space-between; margin-top: 15px; padding-top: 15px; border-top: 1px solid #e2e8f0; } .token-info, .time-info { color: #718096; font-size: 0.9em; } .sources-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e2e8f0; } .sources-section h4 { color: #4a5568; margin-bottom: 10px; } .source-item { background: white; padding: 12px; border-radius: 6px; margin-bottom: 10px; font-size: 0.9em; color: #718096; border-left: 3px solid #667eea; } .upload-section { margin-top: 30px; padding-top: 30px; border-top: 2px solid #e2e8f0; } #fileInput { margin-right: 15px; margin-bottom: 15px; } .loading { text-align: center; padding: 50px; } .spinner { border: 4px solid #f3f3f3; border-top: 4px solid #667eea; border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; margin: 0 auto 20px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .stats-modal { position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; } .modal-content { background-color: white; padding: 30px; border-radius: 12px; width: 80%; max-width: 500px; position: relative; } .close { position: absolute; right: 20px; top: 20px; font-size: 28px; font-weight: bold; color: #aaa; cursor: pointer; } .close:hover { color: #000; } #statsContent { margin-top: 20px; } .stat-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #e2e8f0; } .stat-item:last-child { border-bottom: none; } .error-message { background: #fed7d7; color: #9b2c2c; padding: 12px; border-radius: 8px; margin: 15px 0; } .success-message { background: #c6f6d5; color: #22543d; padding: 12px; border-radius: 8px; margin: 15px 0; }