Files
remoteturtle/client/src/components/VoiceControl.css

210 lines
3.4 KiB
CSS

.voice-control {
padding: 1rem;
background: #1e293b;
border-radius: 0.5rem;
border: 1px solid #334155;
}
.voice-control.unsupported {
text-align: center;
padding: 2rem;
color: #ef4444;
}
.voice-control.unsupported small {
color: #9ca3af;
display: block;
margin-top: 0.5rem;
}
.voice-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}
.voice-header h3 {
font-size: 1rem;
font-weight: 600;
color: #f9fafb;
margin: 0;
}
.selected-turtle {
font-size: 0.875rem;
color: #10b981;
font-weight: 600;
}
.no-selection {
font-size: 0.875rem;
color: #9ca3af;
}
.voice-button {
width: 100%;
padding: 1.5rem;
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
border: none;
border-radius: 0.75rem;
color: white;
font-weight: 600;
font-size: 1rem;
cursor: pointer;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
transition: all 0.3s;
position: relative;
overflow: hidden;
}
.voice-button:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}
.voice-button:disabled {
background: #374151;
cursor: not-allowed;
opacity: 0.5;
}
.voice-button.listening {
background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
animation: pulse-glow 2s infinite;
}
@keyframes pulse-glow {
0%, 100% {
box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}
50% {
box-shadow: 0 0 40px rgba(239, 68, 68, 0.8);
}
}
.voice-button .icon {
font-size: 2rem;
}
.pulse-ring {
position: absolute;
width: 80px;
height: 80px;
border: 3px solid rgba(255, 255, 255, 0.6);
border-radius: 50%;
animation: pulse-ring 1.5s infinite;
}
@keyframes pulse-ring {
0% {
transform: scale(0.5);
opacity: 1;
}
100% {
transform: scale(1.5);
opacity: 0;
}
}
.voice-feedback {
margin-top: 1rem;
padding: 1rem;
background: #0f172a;
border-radius: 0.5rem;
border: 1px solid #1e293b;
}
.transcript {
color: #e5e7eb;
margin-bottom: 0.5rem;
font-size: 0.875rem;
}
.transcript strong {
color: #60a5fa;
}
.last-command {
color: #10b981;
font-size: 0.875rem;
font-family: 'Courier New', monospace;
}
.last-command strong {
color: #34d399;
}
.voice-commands-help {
margin-top: 1rem;
}
.voice-commands-help details {
background: #0f172a;
border-radius: 0.5rem;
border: 1px solid #1e293b;
}
.voice-commands-help summary {
padding: 0.75rem;
cursor: pointer;
font-weight: 600;
color: #94a3b8;
-webkit-user-select: none;
user-select: none;
transition: all 0.2s;
}
.voice-commands-help summary:hover {
color: #e5e7eb;
}
.commands-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 1rem;
padding: 1rem;
}
.command-category h4 {
font-size: 0.75rem;
color: #60a5fa;
text-transform: uppercase;
margin: 0 0 0.5rem 0;
font-weight: 700;
letter-spacing: 0.05em;
}
.command-category ul {
list-style: none;
padding: 0;
margin: 0;
}
.command-category li {
font-size: 0.75rem;
color: #9ca3af;
padding: 0.25rem 0;
font-family: 'Courier New', monospace;
}
.command-category li::before {
content: "▸ ";
color: #3b82f6;
font-weight: bold;
}
/* Mobile responsive */
@media (max-width: 768px) {
.voice-button {
padding: 1.25rem;
}
.commands-grid {
grid-template-columns: 1fr;
}
}