trabb / web /style.css
fokan's picture
Initial commit
0a32234
/* Reset and base styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
color: #333;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* Header */
header {
text-align: center;
margin-bottom: 40px;
color: white;
}
header h1 {
font-size: 2.5rem;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
header p {
font-size: 1.1rem;
opacity: 0.9;
}
/* Main content */
main {
background: white;
border-radius: 20px;
padding: 40px;
box-shadow: 0 20px 60px rgba(0,0,0,0.1);
flex: 1;
}
/* Upload section */
.upload-section {
margin-bottom: 30px;
}
.upload-area {
border: 3px dashed #ddd;
border-radius: 15px;
padding: 40px 20px;
text-align: center;
background: #fafafa;
transition: all 0.3s ease;
cursor: pointer;
}
.upload-area:hover {
border-color: #667eea;
background: #f0f4ff;
}
.upload-area.dragover {
border-color: #667eea;
background: #e8f0ff;
transform: scale(1.02);
}
.upload-content {
pointer-events: none;
}
.upload-icon {
font-size: 3rem;
margin-bottom: 15px;
}
.upload-area p {
font-size: 1.1rem;
color: #666;
margin-bottom: 20px;
}
.browse-btn {
background: #667eea;
color: white;
border: none;
padding: 12px 30px;
border-radius: 25px;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s ease;
pointer-events: all;
}
.browse-btn:hover {
background: #5a6fd8;
transform: translateY(-2px);
}
/* File info */
.file-info {
background: #f8f9fa;
border-radius: 10px;
padding: 15px 20px;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 15px;
}
.file-details {
display: flex;
flex-direction: column;
}
.file-name {
font-weight: 600;
color: #333;
margin-bottom: 5px;
}
.file-size {
font-size: 0.9rem;
color: #666;
}
.remove-btn {
background: #ff6b6b;
color: white;
border: none;
width: 30px;
height: 30px;
border-radius: 50%;
cursor: pointer;
font-size: 1rem;
display: flex;
align-items: center;
justify-content: center;
}
.remove-btn:hover {
background: #ff5252;
}
/* Options section */
.options-section {
margin-bottom: 30px;
}
/* Model info card */
.model-info {
margin-bottom: 20px;
}
.info-card {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border-radius: 15px;
padding: 20px;
display: flex;
align-items: center;
gap: 15px;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.model-icon {
font-size: 2rem;
background: rgba(255, 255, 255, 0.2);
padding: 10px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
min-width: 60px;
height: 60px;
}
.model-details strong {
display: block;
font-size: 1.1rem;
margin-bottom: 5px;
}
.model-details p {
margin: 0;
opacity: 0.9;
font-size: 0.95rem;
}
.form-group {
margin-bottom: 20px;
}
.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #333;
}
select {
width: 100%;
padding: 12px 15px;
border: 2px solid #e9ecef;
border-radius: 10px;
background: white;
font-size: 1rem;
transition: border-color 0.3s ease;
}
select:focus {
outline: none;
border-color: #667eea;
}
.translate-btn {
width: 100%;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 15px 30px;
border-radius: 15px;
font-size: 1.2rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
margin-top: 20px;
}
.translate-btn:hover:not(:disabled) {
transform: translateY(-3px);
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}
.translate-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
.btn-spinner {
display: none;
}
/* Progress section */
.progress-section {
margin-bottom: 30px;
text-align: center;
}
.progress-bar {
width: 100%;
height: 8px;
background: #e9ecef;
border-radius: 4px;
overflow: hidden;
margin-bottom: 15px;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, #667eea, #764ba2);
width: 0%;
transition: width 0.3s ease;
border-radius: 4px;
}
.progress-text {
color: #666;
font-size: 1rem;
}
/* Results section */
.results-section h3 {
color: #28a745;
margin-bottom: 25px;
text-align: center;
font-size: 1.5rem;
}
.report-card {
background: #f8f9fa;
border-radius: 15px;
margin-bottom: 25px;
overflow: hidden;
}
.report-header {
background: #667eea;
color: white;
padding: 15px 20px;
font-weight: 600;
}
.report-content {
padding: 20px;
}
.report-item {
display: flex;
justify-content: space-between;
padding: 8px 0;
border-bottom: 1px solid #e9ecef;
}
.report-item:last-child {
border-bottom: none;
}
.report-label {
font-weight: 600;
color: #666;
}
.report-value {
color: #333;
font-weight: 500;
}
/* Download section */
.download-section {
margin-bottom: 25px;
}
.download-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px 20px;
background: #f8f9fa;
border-radius: 10px;
margin-bottom: 10px;
}
.download-info {
display: flex;
flex-direction: column;
}
.download-label {
font-weight: 600;
color: #333;
margin-bottom: 5px;
}
.download-name {
color: #666;
font-size: 0.9rem;
}
.download-btn {
background: #28a745;
color: white;
border: none;
padding: 10px 20px;
border-radius: 8px;
cursor: pointer;
font-weight: 600;
transition: all 0.3s ease;
}
.download-btn:hover {
background: #218838;
transform: translateY(-2px);
}
.new-translation-btn {
width: 100%;
background: #6c757d;
color: white;
border: none;
padding: 12px 30px;
border-radius: 10px;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s ease;
}
.new-translation-btn:hover {
background: #5a6268;
}
/* Error section */
.error-card {
background: #fff5f5;
border: 2px solid #fed7d7;
border-radius: 15px;
overflow: hidden;
}
.error-header {
background: #ff6b6b;
color: white;
padding: 15px 20px;
display: flex;
align-items: center;
gap: 10px;
}
.error-title {
font-weight: 600;
font-size: 1.1rem;
}
.error-message {
padding: 20px;
color: #666;
line-height: 1.6;
}
.retry-btn {
background: #ff6b6b;
color: white;
border: none;
padding: 10px 20px;
border-radius: 8px;
cursor: pointer;
margin: 0 20px 20px 20px;
transition: all 0.3s ease;
}
.retry-btn:hover {
background: #ff5252;
}
/* Footer */
footer {
text-align: center;
padding: 20px 0;
color: white;
opacity: 0.8;
margin-top: auto;
}
footer a {
color: white;
text-decoration: none;
font-weight: 600;
}
footer a:hover {
text-decoration: underline;
}
/* Responsive design */
@media (max-width: 768px) {
.container {
padding: 10px;
}
main {
padding: 20px;
}
.form-row {
grid-template-columns: 1fr;
}
header h1 {
font-size: 2rem;
}
.download-item {
flex-direction: column;
align-items: stretch;
gap: 15px;
}
.download-btn {
align-self: center;
}
}
/* Animation classes */
.fade-in {
animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.shake {
animation: shake 0.5s ease-in-out;
}
@keyframes shake {
0%, 100% { transform: translateX(0); }
25% { transform: translateX(-5px); }
75% { transform: translateX(5px); }
}