decodx / styles.css
akashrajeev's picture
Cursor
Deploy DecodX to Hugging Face Docker Space.
8f1a46c
Raw History Blame Contribute Delete
13.7 kB
/* Reset and Base Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
line-height: 1.6;
color: #2d3748;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
}
.container {
max-width: 1500px;
margin: 0 auto;
padding: 20px;
}
/* Header Styles */
.header {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 20px;
padding: 20px 30px;
margin-bottom: 30px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
display: flex;
align-items: center;
gap: 15px;
}
.logo i {
font-size: 2rem;
color: #667eea;
}
.logo h1 {
font-size: 1.8rem;
font-weight: 700;
background: linear-gradient(45deg, #667eea, #764ba2);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.status-indicator {
display: flex;
align-items: center;
gap: 10px;
}
.status-dot {
width: 12px;
height: 12px;
border-radius: 50%;
background: #ef4444;
animation: pulse 2s infinite;
}
.status-dot.connected {
background: #10b981;
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
/* Main Content */
.main {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 20px;
padding: 30px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
margin-bottom: 30px;
}
/* Configuration Panel */
.config-panel {
background: linear-gradient(135deg, #f8fafc, #e2e8f0);
border-radius: 15px;
padding: 25px;
margin-bottom: 30px;
border: 1px solid #e2e8f0;
}
.config-panel h3 {
color: #475569;
margin-bottom: 20px;
font-weight: 600;
}
.config-row {
display: flex;
align-items: center;
gap: 20px;
margin-bottom: 15px;
}
.config-row:last-child {
margin-bottom: 0;
}
.config-row label {
font-weight: 500;
min-width: 100px;
color: #475569;
}
.input-group {
position: relative;
flex: 1;
}
.input-group input {
width: 100%;
padding: 12px 45px 12px 15px;
border: 2px solid #e2e8f0;
border-radius: 10px;
font-size: 14px;
transition: all 0.3s ease;
}
.input-group input:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.toggle-btn {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
color: #64748b;
cursor: pointer;
padding: 8px;
border-radius: 5px;
transition: all 0.3s ease;
}
.toggle-btn:hover {
background: #f1f5f9;
}
select {
flex: 1;
padding: 12px 15px;
border: 2px solid #e2e8f0;
border-radius: 10px;
font-size: 14px;
background: white;
transition: all 0.3s ease;
}
select:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
/* Tabs */
.tabs {
display: flex;
gap: 10px;
margin-bottom: 30px;
background: #f8fafc;
padding: 5px;
border-radius: 15px;
}
.tab-btn {
flex: 1;
padding: 15px 20px;
background: transparent;
border: none;
border-radius: 10px;
cursor: pointer;
font-weight: 500;
color: #64748b;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
}
.tab-btn.active {
background: white;
color: #667eea;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.tab-btn:hover:not(.active) {
color: #475569;
}
/* Tab Content */
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
.input-section h3 {
color: #475569;
margin-bottom: 20px;
font-weight: 600;
}
/* URL Input */
.url-input-group {
margin-bottom: 20px;
}
.url-input-group input {
width: 100%;
padding: 15px 20px;
border: 2px solid #e2e8f0;
border-radius: 10px;
font-size: 16px;
transition: all 0.3s ease;
}
.url-input-group input:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.url-types {
display: flex;
gap: 15px;
margin-top: 15px;
}
.url-type {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 15px;
background: #f1f5f9;
border-radius: 20px;
font-size: 14px;
color: #475569;
}
/* Upload Area */
.upload-area {
border: 3px dashed #cbd5e1;
border-radius: 15px;
padding: 40px 20px;
text-align: center;
transition: all 0.3s ease;
cursor: pointer;
position: relative;
}
.upload-area:hover {
border-color: #667eea;
background: #f8faff;
}
.upload-area.dragover {
border-color: #667eea;
background: #f0f4ff;
transform: scale(1.02);
}
.upload-icon {
font-size: 3rem;
color: #cbd5e1;
margin-bottom: 15px;
}
.upload-area:hover .upload-icon {
color: #667eea;
}
.browse-text {
color: #667eea;
font-weight: 600;
cursor: pointer;
}
.upload-info {
font-size: 14px;
color: #64748b;
margin-top: 10px;
}
#fileInput {
display: none;
}
/* File List */
.file-list {
margin-top: 20px;
}
.file-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px;
background: #f8fafc;
border-radius: 10px;
margin-bottom: 10px;
border-left: 4px solid #667eea;
}
.file-info {
display: flex;
align-items: center;
gap: 15px;
}
.file-icon {
font-size: 1.5rem;
color: #667eea;
}
.file-details h4 {
font-weight: 500;
color: #374151;
}
.file-details p {
font-size: 14px;
color: #6b7280;
}
.remove-file {
background: #ef4444;
color: white;
border: none;
border-radius: 50%;
width: 30px;
height: 30px;
cursor: pointer;
transition: all 0.3s ease;
}
.remove-file:hover {
background: #dc2626;
transform: scale(1.1);
}
/* Questions Section */
.questions-section {
margin: 30px 0;
}
.questions-section h3 {
color: #475569;
margin-bottom: 20px;
font-weight: 600;
}
.question-item {
display: flex;
gap: 10px;
margin-bottom: 15px;
align-items: center;
}
.question-input {
flex: 1;
padding: 15px 20px;
border: 2px solid #e2e8f0;
border-radius: 10px;
font-size: 16px;
transition: all 0.3s ease;
}
.question-input:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.remove-question {
background: #ef4444;
color: white;
border: none;
border-radius: 50%;
width: 40px;
height: 40px;
cursor: pointer;
transition: all 0.3s ease;
}
.remove-question:hover {
background: #dc2626;
transform: scale(1.1);
}
.add-question-btn {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 25px;
background: linear-gradient(45deg, #10b981, #059669);
color: white;
border: none;
border-radius: 10px;
cursor: pointer;
font-weight: 500;
transition: all 0.3s ease;
}
.add-question-btn:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}
/* Action Buttons */
.action-buttons {
display: flex;
gap: 20px;
margin: 30px 0;
}
.process-btn {
flex: 2;
padding: 18px 30px;
background: linear-gradient(45deg, #667eea, #764ba2);
color: white;
border: none;
border-radius: 15px;
cursor: pointer;
font-size: 16px;
font-weight: 600;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
}
.process-btn:hover {
transform: translateY(-3px);
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}
.process-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
.clear-btn {
flex: 1;
padding: 18px 30px;
background: #f8fafc;
color: #64748b;
border: 2px solid #e2e8f0;
border-radius: 15px;
cursor: pointer;
font-size: 16px;
font-weight: 600;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
}
.clear-btn:hover {
background: #ef4444;
color: white;
border-color: #ef4444;
transform: translateY(-2px);
}
/* Loading Indicator */
.loading-indicator {
display: none;
text-align: center;
padding: 40px;
background: linear-gradient(135deg, #f8fafc, #e2e8f0);
border-radius: 15px;
margin: 30px 0;
}
.spinner {
width: 50px;
height: 50px;
border: 4px solid #e2e8f0;
border-top: 4px solid #667eea;
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto 20px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.progress-bar {
width: 100%;
height: 6px;
background: #e2e8f0;
border-radius: 3px;
margin-top: 20px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: linear-gradient(45deg, #667eea, #764ba2);
width: 0%;
animation: progress 3s ease-in-out infinite;
}
@keyframes progress {
0% { width: 0%; }
50% { width: 70%; }
100% { width: 100%; }
}
/* Results Section */
.results-section {
display: none;
margin-top: 30px;
}
.results-section h3 {
color: #475569;
margin-bottom: 20px;
font-weight: 600;
}
.processing-info {
background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
border-radius: 10px;
padding: 20px;
margin-bottom: 25px;
border-left: 4px solid #0ea5e9;
}
.info-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
}
.info-item {
text-align: center;
}
.info-item h4 {
font-size: 24px;
font-weight: 700;
color: #0369a1;
margin-bottom: 5px;
}
.info-item p {
font-size: 14px;
color: #64748b;
}
.answers-container {
display: flex;
flex-direction: column;
gap: 20px;
}
.answer-card {
background: white;
border-radius: 15px;
padding: 25px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
border-left: 4px solid #667eea;
transition: all 0.3s ease;
}
.answer-card:hover {
transform: translateY(-2px);
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
.answer-header {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 15px;
color: #475569;
font-weight: 600;
}
.answer-content {
font-size: 16px;
line-height: 1.6;
color: #374151;
}
/* Example Cards */
.examples-section {
margin-top: 40px;
}
.examples-section h3 {
color: #475569;
margin-bottom: 25px;
font-weight: 600;
}
.examples-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 20px;
}
.example-card {
background: white;
border-radius: 15px;
padding: 25px;
text-align: center;
cursor: pointer;
transition: all 0.3s ease;
border: 2px solid #f1f5f9;
}
.example-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
border-color: #667eea;
}
.example-card i {
font-size: 2.5rem;
color: #667eea;
margin-bottom: 15px;
}
.example-card h4 {
font-size: 1.2rem;
font-weight: 600;
color: #374151;
margin-bottom: 10px;
}
.example-card p {
color: #64748b;
font-size: 14px;
}
/* Footer */
.footer {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 20px;
padding: 25px 30px;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.footer-links {
display: flex;
gap: 25px;
}
.footer-links a {
color: #64748b;
text-decoration: none;
display: flex;
align-items: center;
gap: 8px;
transition: all 0.3s ease;
}
.footer-links a:hover {
color: #667eea;
}
/* Toast Notifications */
.toast-container {
position: fixed;
top: 20px;
right: 20px;
z-index: 1000;
}
.toast {
background: white;
border-radius: 10px;
padding: 15px 20px;
margin-bottom: 10px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
border-left: 4px solid #10b981;
display: flex;
align-items: center;
gap: 12px;
animation: slideIn 0.3s ease;
min-width: 300px;
}
.toast.error {
border-left-color: #ef4444;
}
.toast.warning {
border-left-color: #f59e0b;
}
@keyframes slideIn {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
/* Responsive Design */
@media (max-width: 768px) {
.container {
padding: 15px;
}
.header-content {
flex-direction: column;
gap: 15px;
text-align: center;
}
.config-row {
flex-direction: column;
align-items: stretch;
gap: 10px;
}
.config-row label {
min-width: auto;
}
.action-buttons {
flex-direction: column;
}
.examples-grid {
grid-template-columns: 1fr;
}
.footer {
flex-direction: column;
gap: 15px;
text-align: center;
}
.info-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 480px) {
.tabs {
flex-direction: column;
}
.question-item {
flex-direction: column;
align-items: stretch;
}
.remove-question {
align-self: flex-end;
margin-top: 10px;
}
}