/* Amair Voice Control - Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #0f3460;
    --highlight-color: #e94560;
    --text-color: #f1f1f1;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-color);
    min-height: 100vh;
    padding: 1rem;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-indicator {
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

.status-indicator.connected {
    color: var(--success-color);
}

.status-indicator.error {
    color: var(--error-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.voice-section {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.voice-button {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--highlight-color) 0%, var(--error-color) 100%);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.3);
}

.voice-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(233, 69, 96, 0.5);
}

.voice-button:active:not(:disabled) {
    transform: scale(0.95);
}

.voice-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #666;
}

.voice-button.listening {
    animation: listening 1.5s infinite;
}

@keyframes listening {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.mic-icon {
    font-size: 3rem;
}

.transcript {
    min-height: 60px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 1.1rem;
}

.transcript .hint {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.response-section {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.response-section h3 {
    margin-bottom: 1rem;
    color: var(--success-color);
}

.response-text {
    font-size: 1.2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.response-data {
    font-size: 0.9rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
}

.examples {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.examples h3 {
    margin-bottom: 1rem;
    color: var(--highlight-color);
}

.examples ul {
    list-style: none;
}

.examples li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid var(--highlight-color);
}

.examples li:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    .voice-button {
        width: 120px;
        height: 120px;
    }

    .mic-icon {
        font-size: 2.5rem;
    }

    .response-text {
        font-size: 1rem;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--highlight-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
