147 lines
2.6 KiB
CSS
147 lines
2.6 KiB
CSS
|
|
.fraction-input-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.fraction {
|
|
display: inline-flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.fraction-input {
|
|
width: 80px;
|
|
height: 50px;
|
|
text-align: center;
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
border: 2px solid #e5e7eb;
|
|
border-radius: 8px;
|
|
outline: none;
|
|
transition: all 0.2s;
|
|
color: #1f2937;
|
|
}
|
|
|
|
.fraction-input:focus {
|
|
border-color: #4f46e5;
|
|
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
|
|
}
|
|
|
|
.fraction-line {
|
|
width: 100%;
|
|
height: 3px;
|
|
background: linear-gradient(90deg, transparent, #4f46e5, transparent);
|
|
border-radius: 2px;
|
|
margin: 2px 0;
|
|
}
|
|
|
|
|
|
.operation-btn {
|
|
background: none;
|
|
border: none;
|
|
padding: 0;
|
|
cursor: pointer;
|
|
transition: transform 0.2s;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.operation-btn:hover {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.operation-btn:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
.btn-image {
|
|
width: 64px;
|
|
height: 64px;
|
|
display: block;
|
|
border-radius: 50%;
|
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
transition: box-shadow 0.2s;
|
|
}
|
|
|
|
.operation-btn:hover .btn-image {
|
|
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
|
|
.result-container {
|
|
min-height: 120px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.fraction-result {
|
|
display: inline-flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.fraction-top, .fraction-bottom {
|
|
display: block;
|
|
padding: 0 20px;
|
|
min-width: 60px;
|
|
text-align: center;
|
|
}
|
|
|
|
.fraction-line-result {
|
|
width: 100%;
|
|
min-width: 80px;
|
|
height: 3px;
|
|
background: linear-gradient(90deg, #4f46e5, #7c3aed, #4f46e5);
|
|
border-radius: 2px;
|
|
}
|
|
|
|
|
|
#error-message {
|
|
margin-top: 10px;
|
|
padding: 8px 16px;
|
|
background: #fee2e2;
|
|
border-radius: 6px;
|
|
border-left: 4px solid #ef4444;
|
|
}
|
|
|
|
|
|
@media (max-width: 768px) {
|
|
.fraction-input {
|
|
width: 60px;
|
|
height: 40px;
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
.btn-image {
|
|
width: 48px;
|
|
height: 48px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 1.75rem;
|
|
}
|
|
}
|
|
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(-10px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
#result-display:not(.hidden),
|
|
#result-text:not(.hidden) {
|
|
animation: fadeIn 0.3s ease-out;
|
|
}
|
|
|
|
.hidden {
|
|
display: none !important;
|
|
}
|