Tigersman's picture
Access camera is not fully working
93135d9 verified
:root {
--primary-color: #7c3aed;
--primary-dark: #6d28d9;
--secondary-color: #ede9fe;
--text-color: #1e293b;
--light-text: #64748b;
--border-color: #e2e8f0;
--shadow-color: rgba(0, 0, 0, 0.05);
--card-bg: #ffffff;
--body-bg: #f8fafc;
--success-color: #10b981;
--warning-color: #f59e0b;
--scan-pulse: 0 0 0 0 rgba(124, 58, 237, 0.7);
--glass-effect: rgba(255, 255, 255, 0.25);
--glass-border: 1px solid rgba(255, 255, 255, 0.18);
--gradient-start: #7c3aed;
--gradient-end: #4f46e5;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
color: var(--text-color);
font-family: 'Inter', system-ui, -apple-system, sans-serif;
line-height: 1.5;
background-size: cover;
background-attachment: fixed;
}
@keyframes scanPulse {
0% {
box-shadow: var(--scan-pulse);
}
70% {
box-shadow: 0 0 0 20px rgba(124, 58, 237, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
}
}
.mobile-frame {
width: 100%;
max-width: 375px;
height: 667px;
background: white;
border-radius: 24px;
box-shadow:
0 25px 50px -12px rgba(0, 0, 0, 0.25);
overflow: hidden;
position: relative;
border: 1px solid var(--border-color);
backdrop-filter: blur(16px);
}
@keyframes float {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-10px);
}
}
.app-container {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.app-header {
padding: 24px 20px;
text-align: center;
background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
color: white;
position: relative;
overflow: hidden;
}
.app-header::before {
content: "";
position: absolute;
inset: 0;
background:
radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 50%);
z-index: 1;
}
.logo-container {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
position: relative;
z-index: 2;
}
.logo-icon {
width: 60px;
height: 60px;
background: rgba(255, 255, 255, 0.2);
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
font-size: 28px;
backdrop-filter: blur(8px);
border: 2px solid rgba(255, 255, 255, 0.3);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
animation: float 3s ease-in-out infinite;
}
.logo-text h1 {
font-size: 2rem;
font-weight: 800;
letter-spacing: -0.5px;
margin: 0;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.header-subtitle {
font-size: 0.9rem;
opacity: 0.9;
margin-top: 4px;
}
.tab-content {
display: none;
flex: 1;
overflow-y: auto;
padding: 20px;
}
.tab-content.active {
display: block;
}
.scan-area {
display: flex;
flex-direction: column;
gap: 20px;
}
.camera-view {
position: relative;
width: 100%;
height: 320px;
background: white;
border-radius: 24px;
display: flex;
flex-direction: column;
overflow: hidden;
border: 1px solid var(--border-color);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
margin-bottom: 0;
background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(79, 70, 229, 0.05));
}
.camera-view.active-scan {
border: 2px solid var(--primary-color);
}
.placeholder-image {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
position: relative;
background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(79, 70, 229, 0.1));
}
.placeholder-image::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(79, 70, 229, 0.1));
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
@keyframes gradientBG {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.camera-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(79, 70, 229, 0.2));
z-index: 2;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 20px;
}
.camera-icon {
width: 60px;
height: 60px;
background: var(--primary-color);
border-radius: 16px;
display: flex;
justify-content: center;
align-items: center;
font-size: 24px;
color: white;
margin-bottom: 12px;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 15px;
margin-top: 20px;
width: 100%;
max-width: 280px;
}
.feature-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
font-size: 0.75rem;
color: white;
text-align: center;
}
.feature-item i {
font-size: 18px;
background: rgba(255, 255, 255, 0.25);
width: 40px;
height: 40px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
}
.camera-overlay p {
font-weight: 600;
font-size: 1.2rem;
color: white;
text-align: center;
}
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
color: var(--light-text);
gap: 12px;
}
.empty-state i {
font-size: 32px;
color: var(--border-color);
}
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.2); }
100% { transform: scale(1); }
}
.scan-buttons {
display: flex;
justify-content: center;
gap: 20px;
margin-top: 20px;
}
.scan-button {
width: 64px;
height: 64px;
border-radius: 50%;
background: var(--primary-color);
color: white;
border: none;
display: flex;
justify-content: center;
align-items: center;
font-size: 24px;
box-shadow:
0 8px 16px rgba(124, 58, 237, 0.3);
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
will-change: transform;
position: relative;
overflow: hidden;
border: 3px solid white;
position: relative;
}
.scan-button::after {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: conic-gradient(
from 0deg,
transparent,
rgba(255, 255, 255, 0.4) 20%,
transparent 80%
);
animation: rotate 3s linear infinite;
z-index: 1;
}
.scan-button i {
position: relative;
z-index: 2;
}
.scan-button::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: linear-gradient(
to bottom right,
rgba(255, 255, 255, 0.3) 0%,
rgba(255, 255, 255, 0) 60%
);
transform: rotate(30deg);
transition: all 0.6s ease;
}
.scan-button:hover::before {
transform: translateX(100%) rotate(30deg);
}
.scan-button:hover {
transform: translateY(-4px) scale(1.05);
box-shadow:
0 10px 15px -3px rgba(0, 0, 0, 0.1),
0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
.upload-button {
background: var(--success-color);
box-shadow:
0 4px 6px -1px rgba(16, 185, 129, 0.3),
0 2px 4px -2px rgba(16, 185, 129, 0.3);
}
.upload-button:hover {
background: #059669;
box-shadow:
0 6px 8px -1px rgba(16, 185, 129, 0.4),
0 4px 6px -2px rgba(16, 185, 129, 0.4);
}
.capture-button {
background: var(--primary-color);
}
.results-preview {
background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
border-radius: 24px;
padding: 20px;
backdrop-filter: blur(16px);
border: 1px solid rgba(255, 255, 255, 0.5);
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.results-preview h3 {
margin-bottom: 10px;
color: var(--primary-color);
border-bottom: 2px solid var(--primary-color);
padding-bottom: 8px;
display: inline-block;
}
.text-preview {
padding: 16px;
background: linear-gradient(135deg, #f8fafc, #ffffff);
border-radius: 16px;
min-height: 140px;
border: 1px solid rgba(124, 58, 237, 0.15);
position: relative;
overflow: hidden;
backdrop-filter: blur(8px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.image-preview-container {
margin-top: 20px;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
border-radius: 24px;
padding: 20px;
backdrop-filter: blur(16px);
border: 1px solid rgba(255, 255, 255, 0.5);
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.image-preview-container h4 {
margin-bottom: 12px;
color: var(--primary-color);
font-size: 1rem;
}
.image-preview {
position: relative;
width: 100%;
height: 200px;
border-radius: 16px;
overflow: hidden;
border: 1px solid var(--border-color);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.image-preview img {
width: 100%;
height: 100%;
object-fit: cover;
}
.close-preview {
position: absolute;
top: 8px;
right: 8px;
width: 32px;
height: 32px;
background: rgba(0, 0, 0, 0.6);
border: none;
border-radius: 50%;
color: white;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 14px;
transition: all 0.3s ease;
}
.close-preview:hover {
background: rgba(0, 0, 0, 0.8);
transform: scale(1.1);
}
.processed-text-section {
margin-top: 20px;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
border-radius: 24px;
padding: 20px;
backdrop-filter: blur(16px);
border: 1px solid rgba(255, 255, 255, 0.5);
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.processed-text-section h4 {
margin-bottom: 12px;
color: var(--primary-color);
font-size: 1rem;
}
.processed-text-content {
padding: 16px;
background: linear-gradient(135deg, #f8fafc, #ffffff);
border-radius: 16px;
min-height: 100px;
border: 1px solid rgba(124, 58, 237, 0.1);
position: relative;
overflow: hidden;
backdrop-filter: blur(8px);
white-space: pre-wrap;
line-height: 1.6;
}
.ocr-text {
position: relative;
z-index: 1;
background: white;
padding: 8px;
border-radius: 4px;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
margin: 4px 0;
line-height: 1.6;
}
.timestamp {
font-size: 0.8rem;
color: var(--light-text);
text-align: right;
margin-top: 8px;
position: relative;
z-index: 1;
}
.history-list h3 {
margin-bottom: 15px;
display: flex;
align-items: center;
gap: 8px;
}
.history-empty {
text-align: center;
padding: 50px 0;
color: var(--light-text);
}
.settings-options h3 {
margin-bottom: 15px;
display: flex;
align-items: center;
gap: 8px;
}
.setting-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 0;
border-bottom: 1px solid var(--border-color);
}
.switch {
position: relative;
display: inline-block;
width: 50px;
height: 24px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
transition: .4s;
border-radius: 24px;
}
.slider:before {
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 4px;
bottom: 4px;
background-color: white;
transition: .4s;
border-radius: 50%;
}
input:checked + .slider {
background-color: var(--primary-color);
}
input:checked + .slider:before {
transform: translateX(26px);
}
.bottom-tabs {
display: flex;
justify-content: space-around;
padding: 16px 0;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
backdrop-filter: blur(16px);
border-top: 1px solid rgba(255, 255, 255, 0.5);
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}
.tab-button {
display: flex;
flex-direction: column;
align-items: center;
text-decoration: none;
color: var(--light-text);
font-size: 12px;
gap: 6px;
padding: 8px 20px;
border-radius: 16px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
font-weight: 500;
}
.tab-button::before {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 0;
height: 3px;
background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
transition: width 0.3s ease;
border-radius: 3px 3px 0 0;
}
.tab-button i {
font-size: 22px;
transition: all 0.3s ease;
}
.tab-button.active {
color: var(--primary-color);
background: rgba(124, 58, 237, 0.05);
}
.tab-button.active::before {
width: 80%;
}
.tab-button.active i {
transform: translateY(-4px);
filter: drop-shadow(0 4px 8px rgba(124, 58, 237, 0.3);
}
.tab-button:hover:not(.active) {
color: var(--primary-color);
background: rgba(124, 58, 237, 0.05);
}
@keyframes rotate {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
select {
padding: 5px 10px;
border-radius: 5px;
border: 1px solid var(--border-color);
background: white;
}