/* Converter Interface */
.converter-interface {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.converter-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    background: var(--surface, #ffffff);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border, #e5e7eb);
}

@media (min-width: 768px) {
    .converter-card {
        grid-template-columns: 1fr 1fr;
        padding: 2rem;
        gap: 2rem;
    }
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border, #e5e7eb);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main, #111827);
}

.section-title .icon {
    width: 20px;
    height: 20px;
    color: var(--primary, #3b82f6);
}

.section-actions {
    display: flex;
    gap: 0.5rem;
}

/* Icon Buttons */
.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    background: var(--surface-muted, #f9fafb);
    color: var(--text-muted, #6b7280);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

.btn-icon:hover {
    background: var(--primary, #3b82f6);
    color: #ffffff;
    border-color: var(--primary, #3b82f6);
    transform: translateY(-1px);
}

.btn-icon:active {
    transform: translateY(0);
}

/* Editor Wrappers */
.editor-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-muted, #f9fafb);
    border: 1px solid var(--border, #e5e7eb);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.editor-wrapper:focus-within {
    border-color: var(--primary, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.code-editor {
    width: 100%;
    min-height: 400px;
    padding: 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-main, #111827);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.code-editor::placeholder {
    color: var(--text-muted, #9ca3af);
}

.code-output {
    width: 100%;
    min-height: 400px;
    max-height: 600px;
    padding: 1.25rem;
    margin: 0;
    border: none;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.code-output:empty::before {
    content: '// Generated Objective-C code will appear here';
    color: #64748b;
}

/* Input Actions */
.input-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3), 0 2px 4px -1px rgba(59, 130, 246, 0.2);
    width: 100%;
}

.btn-primary svg {
    width: 20px;
    height: 20px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4), 0 4px 6px -2px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    min-height: 2.5rem;
}

.status-indicator.show {
    opacity: 1;
}

.status-indicator.success {
    background: #d1fae5;
    color: #065f46;
}

.status-indicator.error {
    background: #fee2e2;
    color: #991b1b;
}

.status-indicator.info {
    background: #dbeafe;
    color: #1e40af;
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .converter-card {
        padding: 1rem;
        gap: 1.5rem;
    }

    .section-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .code-editor,
    .code-output {
        min-height: 300px;
        font-size: 13px;
        padding: 1rem;
    }

    .btn-primary {
        padding: 1rem 2rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .converter-card {
        background: #1f2937;
        border-color: #374151;
    }

    .section-title {
        color: #f9fafb;
    }

    .editor-wrapper {
        background: #111827;
        border-color: #374151;
    }

    .code-editor {
        color: #f9fafb;
    }

    .code-editor::placeholder {
        color: #6b7280;
    }

    .btn-icon {
        background: #374151;
        border-color: #4b5563;
        color: #d1d5db;
    }

}

/* Animation for conversion success */
@keyframes pulse-success {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0);
    }
}

.converter-card.success {
    animation: pulse-success 0.6s ease;
}
