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

.ios-translate-card {
    background: rgba(30, 30, 40, 0.4);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border-radius: 32px;
    padding: 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Language Bar */
.ios-lang-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ios-lang-select {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    appearance: none;
    text-align: center;
    padding: 0.5rem;
    border-radius: 12px;
    transition: background 0.2s;
}

.ios-lang-select:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

.ios-swap-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ios-swap-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(180deg) scale(1.1);
}

.ios-swap-btn:active {
    transform: rotate(180deg) scale(0.9);
}

/* Text Areas */
.ios-text-area-container {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ios-input-group {
    position: relative;
    margin-bottom: 1rem;
}

.ios-text-area {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 500;
    resize: none;
    outline: none;
    min-height: 120px;
    line-height: 1.5;
    font-family: inherit;
}

.ios-text-area::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.ios-text-area.target {
    color: #8f73ff;
    /* Accent color */
}

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

/* Controls inside text area */
.ios-input-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.ios-char-count {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.ios-clear-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem;
    transition: color 0.2s;
}

.ios-clear-btn:hover {
    color: #fff;
}

/* Action Bar */
.ios-action-bar {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ios-action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 0.8rem 1.2rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ios-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px) scale(1.02);
}

.ios-action-btn:active {
    transform: translateY(0) scale(0.95);
}

.ios-action-btn.primary {
    background: #8f73ff;
    color: white;
    flex-grow: 1;
    justify-content: center;
    margin-right: 1rem;
    /* RTL support check needed */
}

.ios-action-btn.primary:hover {
    background: #7a5cf0;
    box-shadow: 0 4px 15px rgba(143, 115, 255, 0.4);
}

.ios-icon-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    padding: 0.8rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.ios-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Quick Phrases */
.ios-quick-phrases {
    margin-top: 2rem;
}

.ios-quick-phrases h3 {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ios-phrases-scroll {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: none;
    /* Firefox */
}

.ios-phrases-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.ios-phrase-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.6rem 1rem;
    color: #fff;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.ios-phrase-chip:hover {
    background: rgba(143, 115, 255, 0.2);
    border-color: rgba(143, 115, 255, 0.4);
}

/* RTL Adjustments */
[dir="rtl"] .ios-action-btn.primary {
    margin-right: 0;
    margin-left: 1rem;
}