/* iOS Style Speech Translator */
.speech-translator-container.ios-style {
    max-width: 400px;
    margin: 0 auto;
    padding: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ios-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Header / Language Selector */
.ios-header {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.ios-lang-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.ios-select {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    appearance: none;
    text-align: center;
}

.ios-select option {
    background: #1f1f1f;
    color: #fff;
}

.ios-arrow {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
}

/* Content Area */
.ios-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ios-text-area {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ios-text-placeholder,
.ios-translation-placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    line-height: 1.5;
}

#recognizedText,
#translationOutput {
    width: 100%;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 500;
}

#translationOutput {
    color: #8f73ff;
    /* Accent color for translation */
}

.ios-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    width: 100%;
}

/* Mic Button */
.ios-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.ios-mic-btn {
    width: 70px;
    /* Smaller size */
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8f73ff, #8b5cf6);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 15px rgba(143, 115, 255, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ios-mic-btn:active {
    transform: scale(0.95);
}

.ios-mic-btn.listening {
    background: #ef4444;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5);
    animation: pulse-red 1.5s infinite;
}

.ios-mic-icon {
    font-size: 1.8rem;
    z-index: 2;
}

.ios-status-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Actions */
.ios-actions {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.ios-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 12px;
    padding: 0.6rem 1rem;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.ios-action-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.ios-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ios-action-btn.primary {
    background: #8f73ff;
    color: white;
}

.ios-action-btn.primary:hover {
    background: #7a5cf0;
}

.ios-action-btn.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* History */
.ios-history {
    margin-top: 2rem;
}

.ios-history h3 {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
}

.ios-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.ios-history-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ios-history-source {
    color: #fff;
    font-size: 1rem;
}

.ios-history-target {
    color: #8f73ff;
    font-size: 0.95rem;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}