yashdubey's picture
Upload 14 files
64af902 verified
/* Copy of main style.css for app-level static directory */
/* Magic UI Styles */
:root {
--gradient-start: #6366f1;
--gradient-mid: #8b5cf6;
--gradient-end: #d946ef;
--shadow-color: rgba(99, 102, 241, 0.2);
--glow-color: rgba(139, 92, 246, 0.6);
}
/* Enhanced translator card */
.magic-card {
border-radius: 20px;
overflow: hidden;
transition: all 0.5s ease;
box-shadow: 0 10px 40px var(--shadow-color) !important;
border: none;
margin: 20px 0;
}
.magic-card:hover {
box-shadow: 0 15px 60px var(--shadow-color) !important;
transform: translateY(-5px);
}
.card-header.bg-gradient {
background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
padding: 20px;
border: none;
}
/* Professional buttons */
.btn-primary {
background-color: #4361ee;
color: white;
border: none;
position: relative;
transition: all 0.3s ease;
}
.btn-primary:hover, .btn-primary:focus {
background-color: #3a56d4;
color: white;
box-shadow: 0 2px 5px rgba(67, 97, 238, 0.2);
transform: translateY(-1px);
}
/* Translate button special effect */
.translate-btn {
font-weight: 500;
letter-spacing: 0.3px;
}
/* Swap button animation */
.swap-btn {
transition: all 0.3s ease;
background-color: #f8f9fa;
border: 1px solid #e9ecef;
color: #495057;
}
.swap-btn:hover {
background-color: #e9ecef;
transform: scale(1.05);
}
/* Enhanced form controls */
.enhanced-select {
border: 2px solid #e2e8f0;
padding: 12px 45px 12px 20px;
border-radius: 12px;
font-weight: 500;
background-image: none;
transition: all 0.3s ease;
}
.enhanced-select:focus {
border-color: var(--gradient-mid);
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}
.language-select-icon {
top: 50%;
right: 18px;
transform: translateY(-50%);
color: var(--gradient-mid);
}
/* Magic textarea */
.magic-textarea {
border: 2px solid #e2e8f0;
border-radius: 15px;
transition: all 0.3s ease;
font-size: 1.05rem;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) !important;
}
.magic-textarea:focus {
border-color: var(--gradient-mid);
box-shadow: 0 5px 25px rgba(139, 92, 246, 0.15) !important;
}
.text-input-decoration {
position: absolute;
top: 10px;
right: 10px;
width: 50px;
height: 50px;
border-radius: 50%;
background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0) 70%);
pointer-events: none;
}
/* Translation result container */
.result-container {
background: linear-gradient(to right bottom, #ffffff, #f9fafb);
border: none;
border-radius: 15px;
padding: 25px;
min-height: 150px;
position: relative;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05) !important;
}
.translation-indicator {
position: absolute;
top: 10px;
right: 10px;
opacity: 0.7;
}
/* Progress bar */
.progress {
background-color: #f0f3f8;
}
.progress-bar {
animation: progress-pulse 1.5s infinite;
}
@keyframes progress-pulse {
0% { opacity: 0.8; }
50% { opacity: 1; }
100% { opacity: 0.8; }
}
/* Feature cards */
.feature-card {
border-radius: 16px;
overflow: hidden;
transition: all 0.3s ease;
}
.feature-card:hover {
transform: translateY(-10px);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}
.feature-icon {
width: 80px;
height: 80px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20px;
transition: all 0.3s ease;
}
.feature-card:hover .feature-icon {
transform: scale(1.1);
}
/* Custom language select styling */
.language-select-wrapper {
display: block;
position: relative;
}
.language-select-icon {
top: 50%;
right: 12px;
transform: translateY(-50%);
pointer-events: none;
color: var(--primary-color);
}
.language-select-wrapper select {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
padding-right: 30px; /* Space for the icon */
cursor: pointer;
background-color: white;
border-color: var(--border-color);
transition: all 0.2s;
}
.language-select-wrapper select:hover {
border-color: var(--primary-color);
}
.language-select-wrapper select:focus {
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
border-color: var(--primary-color);
outline: none;
}
.highlight-select {
animation: pulse-border 0.8s ease;
}
@keyframes pulse-border {
0% { border-color: var(--border-color); }
50% { border-color: var(--primary-color); }
100% { border-color: var(--border-color); }
}
/* Fix select option styles */
.form-select option {
padding: 10px;
font-size: 0.95rem;
}
/* Fix for textarea and text input fields */
textarea.form-control {
white-space: normal !important;
word-wrap: break-word !important;
overflow-wrap: break-word !important;
resize: vertical !important;
}
#translationResult p {
white-space: pre-wrap !important;
word-wrap: break-word !important;
overflow-wrap: break-word !important;
}
/* Improve UI aesthetics */
.translator-card {
transition: all 0.3s ease;
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important;
}
.translator-card:hover {
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
transform: translateY(-2px);
}
/* Improve focus states for accessibility */
.form-control:focus, .form-select:focus, .btn:focus {
box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25) !important;
}
/* Add subtle hover effects to buttons */
.btn:hover {
transform: translateY(-1px);
transition: all 0.2s ease;
}
/* Action buttons styling */
.action-btn {
background-color: #f8f9fa;
border: 1px solid #e9ecef;
color: #495057;
transition: all 0.2s ease;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.action-btn:hover {
background-color: #e9ecef;
color: #212529;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}
/* Animated typing effect for the logo */
.typing-animation {
border-right: .15em solid var(--primary-color);
white-space: nowrap;
margin: 0 auto;
letter-spacing: .15em;
animation:
typing 3.5s steps(30, end),
blink-caret .75s step-end infinite;
display: inline-block;
}
@keyframes typing {
from { width: 0 }
to { width: 100% }
}
@keyframes blink-caret {
from, to { border-color: transparent }
50% { border-color: var(--primary-color); }
}
/* Tooltip styling */
.custom-tooltip {
position: relative;
display: inline-block;
}
.custom-tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: #555;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -60px;
opacity: 0;
transition: opacity 0.3s;
}
.custom-tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
/* Language badge styling */
.lang-badge {
border-radius: 50%;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
margin-right: 5px;
}
/* History item hover effect */
.list-group-item {
transition: all 0.3s ease;
}
.list-group-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
/* Progress bar pulsating effect */
@keyframes pulse {
0% { opacity: 0.6; }
50% { opacity: 1; }
100% { opacity: 0.6; }
}
.progress-bar {
animation: pulse 1.5s infinite;
}
/* Responsive adjustments */
@media (max-width: 992px) {
.container {
padding: 15px;
}
.typing-animation {
letter-spacing: 0.1em;
}
}
@media (max-width: 768px) {
.container {
padding: 12px;
}
h1 {
font-size: 1.5rem;
}
.form-control, .form-select {
font-size: 14px;
}
.typing-animation {
letter-spacing: 0.05em;
animation: none; /* Disable typing animation on mobile */
}
.custom-tooltip .tooltiptext {
width: 100px;
margin-left: -50px;
}
.lang-badge {
width: 24px;
height: 24px;
font-size: 12px;
}
}
@media (max-width: 576px) {
.container {
padding: 10px;
}
h1 {
font-size: 1.3rem;
}
.form-control, .form-select {
font-size: 13px;
}
.lang-badge {
width: 20px;
height: 20px;
font-size: 10px;
margin-right: 2px;
}
.custom-tooltip .tooltiptext {
display: none; /* Hide tooltips on very small screens */
}
}
/* Fix touch interactions on mobile devices */
@media (hover: none) {
.list-group-item:hover {
transform: none;
box-shadow: none;
}
.custom-tooltip:hover .tooltiptext {
visibility: hidden;
opacity: 0;
}
}